Bitcoin Forum

Alternate cryptocurrencies => Altcoin Discussion => Topic started by: Logicbet on August 31, 2017, 09:59:39 PM



Title: Created Altcoin - No hashespersec
Post by: Logicbet on August 31, 2017, 09:59:39 PM
I have created my own cryptocurrency using the source of bitcoin-0.10;
I am at the stage where i need to mine the genesis block. ( I've edited the coin, found genesis hash etc ).

Next step was to create a node (using DigitalOcean vps)
So i done this run and ./mycoind

It appears that it can connect with my homePC running QT wallet (shows connections/peers..only as outgoing though), but upon setgenerate true -1, it will never do any hashes always at 0, same with networkhashes. ( I Also tested this with cloning the VPS server image and then making another node and connecting them too each other and my home pc to them, but that didnt seem to have any benefit either.. )

I can give more info if anyone needs.

Thanks in advanced


Title: Re: Created Altcoin - No hashespersec
Post by: Logicbet on September 05, 2017, 09:51:23 AM
Problem fixed.


Encase others run into a similar problem here what i did wrong;
1. Unsure if it was the main issue or not but i didn't have my testnet and regtest genesis's below nBits, so found correct hashes for genesis for both and then placed in 'chainparams.cpp'.
2. below is what actually solved my issue though dunno if is correct way to do;
In short; i mined the first genesis block without the node connected, then added its hash to checkpoints

Solution Below
Quote
i changed in 'chainparams.cpp'

the following bools;
Quote
fRequireRPCPassword = true;
fMiningRequiresPeers = true;
fMineBlocksOnDemand = false;
to;
Quote
fRequireRPCPassword = false;
fMiningRequiresPeers = false;
fMineBlocksOnDemand = true;

for the 'main'

Then using just my home pc ( didn't connect to node ) i used setgenerate true -1.
it then began to mine the first block (took all night and mined it in the morning).

once i had this block i added its hash to the checkpoints as #1... (1, 0x000000004a54f33..)..
changed the bools mentioned above to their previous values (true, true, false).
and recompiled uploaded the new recompiled version to server,
ran the deamon on the server using the following config

(may be wrong stuff, just what i used first try and it seemed to work).

Server mycoin config;
Quote
server=1
daemon=1
listen=1
rpcallowip=127.0.0.1
connect=<HOME_PC's_IP>
rpcallowip=<HOME_PC's_IP>
rpcuser=blah
rpcpassword=yeahprobablynotthis

And for my home pc using;

Quote
server=1
daemon=1
externalip=<HOME_PC's_IP>
rpcconnect=<SERVERS_IP>
rpcallowip=<SERVERS_IP>
addnode=<SERVERS_IP>
rpcallowip=127.0.0.1
rpcuser=AnotherTest
rpcpassword=PasswordIsProbablyThis

On home PC i ran the QT wallet and it connected fine to node, and transmitted info of the first block etc.

There may be mistakes in that but it seems to be working as of now, i see hashes when i mine on both computers when they connect up. I Guess i just got to make sure it actually mines the next block.