user73029: I have created an altcoin and i wanted to solo mine all coins myself. I disabled generate function in wallet, hidden the source code as private in github.  I run one main node and i mine in my laptop.
After all this, i am seeing somebody generating blocks every 3 second and mining coins without my permission. 
How is this supposed to happen?
I have generated 3000 blocks myself and i am updating the checkpoints too.
What could i do for others not to mine coins?? I readsomewhere disabling decentralization is the way and allow mining from one pubkey. 
How do i implement this in the source code. I cloned my altcoin from litecoin source code.
This is what i could see in my main node but i cant understand anything.
2018-08-02 14:41:37 UpdateTip: new best=707854f716e7588bd7f3c2843679b8a4d587875ac402139bf097e2d2abb4f5c4 height=6066 version=0x20000000 log2_work=33.453735 tx=6070 date='2018-08-02 14:41:36' progress=0.999992 cache=0.4MiB(2679txo)
2018-08-02 14:41:56 connect() to 117.197.198.227:26205 failed after select(): Connection refused (111)
2018-08-02 14:42:25 UpdateTip: new best=2d1ed8e7b980bf547b2c7f0b105a86cfc26b62146d78fefbfef36dc5a3e5e44a height=6067 version=0x20000000 log2_work=33.456159 tx=6071 date='2018-08-02 14:42:18' progress=0.999942 cache=0.4MiB(2680txo)
2018-08-02 14:42:39 UpdateTip: new best=24716008ae83c18d16996cedb6a6154b72eeba4290df4b34247ac8ce548c618a height=6068 version=0x20000000 log2_work=33.458579 tx=6072 date='2018-08-02 14:42:35' progress=0.999967 cache=0.4MiB(2681txo)
2018-08-02 14:42:48 UpdateTip: new best=261f76b166545492a9ed89861ab5aa73f6debea6d28e34c66eb1d31031781c39 height=6069 version=0x20000000 log2_work=33.460996 tx=6073 date='2018-08-02 14:42:39' progress=0.999926 cache=0.4MiB(2682txo)
2018-08-02 14:43:11 connect() to 61.3.144.133:26205 failed after select(): Connection refused (111)
2018-08-02 14:43:37 UpdateTip: new best=11c4b9234b7fae3b1bcab943cb0a939cb85269afae73f6c675d1e0cea8afeabf height=6070 version=0x20000000 log2_work=33.463408 tx=6074 date='2018-08-02 14:43:28' progress=0.999926 cache=0.4MiB(2683txo)
2018-08-02 14:43:42 connect() to 217.182.72.254:26205 failed after select(): Connection refused (111)


user-1: If someone else own your code source he will be able to compile and run your coin daemon, thus he can mine without your approval, this is due to the decentralised and distributed nature of the blockchain environments.
You can however make some modifications in the code to allow certain addresses to be allowed by the network to mine and others not, but this will break a fundamental rule, which makes its strenght, of blockchain networks.

If you want to premine all the coins before releasing to public you can make the genesis block or the first block containing all the coins you need to premine. Then after you premined those coins and matured them you can safely share you blockchain around, setting blocks to 0 or implementing PoS mining.

73029: <p>I have created an altcoin and i wanted to solo mine all coins myself. I disabled generate function in wallet, hidden the source code as private in github.  I run one main node and i mine in my laptop.</p>

<p>After all this, i am seeing somebody generating blocks every 3 second and mining coins without my permission. </p>

<p><strong>How is this supposed to happen?</strong></p>

<p>I have generated 3000 blocks myself and i am updating the checkpoints too.</p>

<p>What could i do for others not to mine coins?? I readsomewhere disabling decentralization is the way and allow mining from one pubkey. </p>

<p>How do i implement this in the source code. I cloned my altcoin from litecoin source code.</p>

<p>This is what i could see in my main node but i cant understand anything.</p>

<pre><code>2018-08-02 14:41:37 UpdateTip: new best=707854f716e7588bd7f3c2843679b8a4d587875ac402139bf097e2d2abb4f5c4 height=6066 version=0x20000000 log2_work=33.453735 tx=6070 date='2018-08-02 14:41:36' progress=0.999992 cache=0.4MiB(2679txo)
2018-08-02 14:41:56 connect() to 117.197.198.227:26205 failed after select(): Connection refused (111)
2018-08-02 14:42:25 UpdateTip: new best=2d1ed8e7b980bf547b2c7f0b105a86cfc26b62146d78fefbfef36dc5a3e5e44a height=6067 version=0x20000000 log2_work=33.456159 tx=6071 date='2018-08-02 14:42:18' progress=0.999942 cache=0.4MiB(2680txo)
2018-08-02 14:42:39 UpdateTip: new best=24716008ae83c18d16996cedb6a6154b72eeba4290df4b34247ac8ce548c618a height=6068 version=0x20000000 log2_work=33.458579 tx=6072 date='2018-08-02 14:42:35' progress=0.999967 cache=0.4MiB(2681txo)
2018-08-02 14:42:48 UpdateTip: new best=261f76b166545492a9ed89861ab5aa73f6debea6d28e34c66eb1d31031781c39 height=6069 version=0x20000000 log2_work=33.460996 tx=6073 date='2018-08-02 14:42:39' progress=0.999926 cache=0.4MiB(2682txo)
2018-08-02 14:43:11 connect() to 61.3.144.133:26205 failed after select(): Connection refused (111)
2018-08-02 14:43:37 UpdateTip: new best=11c4b9234b7fae3b1bcab943cb0a939cb85269afae73f6c675d1e0cea8afeabf height=6070 version=0x20000000 log2_work=33.463408 tx=6074 date='2018-08-02 14:43:28' progress=0.999926 cache=0.4MiB(2683txo)
2018-08-02 14:43:42 connect() to 217.182.72.254:26205 failed after select(): Connection refused (111)
</code></pre>
 -1: <p>If someone else own your code source he will be able to compile and run your coin daemon, thus he can mine without your approval, this is due to the decentralised and distributed nature of the blockchain environments.</p>

<p>You can however make some modifications in the code to allow certain addresses to be allowed by the network to mine and others not, but this will break a fundamental rule, which makes its strenght, of blockchain networks.</p>

<hr>

<p>If you want to premine all the coins before releasing to public you can make the genesis block or the first block containing all the coins you need to premine. Then after you premined those coins and matured them you can safely share you blockchain around, setting blocks to 0 or implementing PoS mining.</p>
