What I have done so far:
- Generated new Genesis Block
- Generated new MerkleRoot
- Updated MerkleRoot
- Updated Genesis block values
- Commented out these lines
- Compiled on CentOS 6
- Created
altcoin.conf
with
rpcuser=someuser rpcpassword=somepassword
- lauched
./altcoin
at this point all seemed to be OK but...
./altcoind getinfo
shows:
{
"version" : 60300,
"protocolversion" : 60001,
"walletversion" : 60000,
"balance" : 0,
"blocks" : 0,
"connections" : 1,
"proxy" : "",
"difficulty" : 1.00000000,
"testnet" : false,
"keypoololdest" : 1400530204,
"keypoolsize" : 104,
"paytxfee" : 0.00000000,
"mininput" : 0.00010000,
"errors" : ""
}
- so I try to use internal miner to mine first block
./altcoind setgenerate true 8
- while checking progress by
./altcoind getmininginfo
i got strange output
which shows:
{
"blocks" : 0,
"currentblocksize" : 0,
"currentblocktx" : 0,
"difficulty" : 1.00000000,
"errors" : "",
"generate" : true,
"genproclimit" : 4,
"hashespersec" : 0,
"networkhashps" : 1.46543,
"pooledtx" : 0,
"testnet" : false
}
At this point, I've issues ./altcoind stop
and when I try to launch it again, debug.log
shows:
Altcoin Network: genesis=0x00000000324a1b505ecd nBitsLimit=0x1d00ffff nBitsInitial=0x1c00ffff nStakeMinAge=604800 nCoinbaseMaturity=500 nModifierInterval=21600
ERROR: CTxDB::LoadBlockIndex() : Failed stake modifier checkpoint height=0, modifier=0x0000000000000000
block index 1ms
Loading wallet...
nFileVersion = 60300
Error loading blkindex.dat
wallet 301ms
Done loading
mapBlockIndex.size() = 1
nBestHeight = -1
setKeyPool.size() = 101
mapWallet.size() = 0
mapAddressBook.size() = 1
- uncommented these lines
- lauched
./altcoind
and the same error over and over again... I am cracking my head already a while....
can one, please point me the right direction. thanks
UPDATE1:
- deleted all the content from
~/.altcoin/
exceptaltcoin.conf
- launched
./altcoind
- issued
./altcoind setgenerate true 4
at this point I figured out ./altcoind
starts up without complaining about stake modifier though everytime I want to restart I have to delete the contents of ~/.altcoin/
otherwise error pops up.
output of debug.log
:
AltCoin version v0.5.4.0-unk-beta ()
Default data directory /root/.thecoin
Loading addresses...
dbenv.open LogDir=/root/.altcoin/database ErrorFile=/root/.altcoin/db.log
Loaded 0 addresses
addresses 30ms
Loading block index...
AltCoin Network: genesis=0x00000000324a1b505ecd nBitsLimit=0x1d00ffff nBitsInitial=0x1c00ffff nStakeMinAge=604800 nCoinbaseMaturity=500 nModifierInterval=21600
00000000324a1b505ecd77b793658f4fa6cd386653fdabd7d1c66907177174d6
00000000324a1b505ecd77b793658f4fa6cd386653fdabd7d1c66907177174d6
d8098e7eb449eed16c09fd7c97dec2acd1ec386ced36cf970a05c92fc2c0a05b
CBlock(hash=00000000324a1b505ecd, ver=1, hashPrevBlock=00000000000000000000, hashMerkleRoot=d8098e7eb4, nTime=1508926967, nBits=1d00ffff, nNonce=2600258680, vtx=1, vchBlockSig=)
Coinbase(hash=d8098e7eb4, nTime=1508926967, ver=1, vin.size=1, vout.size=1, nLockTime=0)
CTxIn(COutPoint(0000000000, -1), coinbase 04ffff001d020f274c4c205468652045636f6e6f6d697374202d2054686520626f79636f7474206f662051617461722069732068757274696e672069747320656e666f7263657273202d204f63742031392032303137)
CTxOut(empty)
vMerkleTree: d8098e7eb4
SetBestChain: new best=00000000324a1b505ecd height=0 trust=1 moneysupply=0.00
Upgrade Info: v0.5+ txdb initialization
ResetSyncCheckpoint: pending for sync-checkpoint ab0dad4b10d2370f009ed6df6effca1ba42f01d5070d6b30afeedf6463fbe7a2
ResetSyncCheckpoint: sync-checkpoint reset to 00000000324a1b505ecd77b793658f4fa6cd386653fdabd7d1c66907177174d6
Upgrade Info: no txdb upgrade v0.3->v0.4 detected.
Upgrade Info: v0.5+ no txdb upgrade detected.
block index 4ms
Loading wallet...
nFileVersion = 60300
Performing wallet upgrade to 60000
keypool added key 1, size=1
keypool added key 2, size=2
keypool added key 3, size=3
...
...
keypool added key 101, size=101
keypool reserve 1
keypool keep 1
wallet 755ms
Done loading
mapBlockIndex.size() = 1
nBestHeight = 0
setKeyPool.size() = 100
mapWallet.size() = 0
mapAddressBook.size() = 1
Bound to port 11111
Added 1.1.1.90:11111 from 127.0.0.1: 0 tried, 1 new
Added 1.1.1.1:11111 from 127.0.0.1: 0 tried, 2 new
ThreadRPCServer started
ipv4 venet0: 127.0.0.1
ipv4 venet0:0: 2.2.2.62
addrLocalHost = 2.2.2.62:11111
IRC seeding/communication disabled
ThreadSocketHandler started
ThreadOpenAddedConnections started
trying connection 1.1.1.90:11111 lastseen=-391515.5hrs
ThreadOpenConnections started
ThreadMessageHandler started
ThreadStakeMinter started
CPUMiner started for proof-of-stake
ThreadDNSAddressSeed started
Loading addresses from DNS seeds (could take a while)
Added 9 addresses from 0:0:0:0:0:0:0:0: 0 tried, 11 new
connected 1.1.1.90:11111
Added time data, samples 2, offset +0 (+0 minutes)
Moving 1.1.1.90:11111 to tried
version message: version 60006, blocks=0
getblocks -1 to 00000000000000000000 limit 500
trying connection 1.1.1.9:11111 lastseen=-391515.5hrs
Added 13 addresses from 1.1.1.90: 1 tried, 23 new
GetMyExternalIP() received [2.2.2.62] 2.2.2.62:0
GetMyExternalIP() returned 2.2.2.62
connected 198.143.186.9:11111
Added 21 addresses from 0:0:0:0:0:0:0:0: 1 tried, 44 new
...
...
2017-10-31 13:15:58 UTC Flushing wallet.dat
...
4 processors
Starting 4 BitcoinMiner threads
CPUMiner started for proof-of-work
CPUMiner started for proof-of-work
CPUMiner started for proof-of-work
CPUMiner started for proof-of-work
...
...
ThreadRPCServer method=getmininginfo
despite it is up and running and both nodes are connected to eachother, outputs of ./altcoind getinfo
and ./altcoind getmininginfo
are still the same.
UPDATE 2
- removed all hard checkpoints from
kernel.cpp
link added
( 0, 0x0000000000000000 )
// Hard checkpoints of stake modifiers to ensure they are deterministic static std::map mapStakeModifierCheckpoints = boost::assign::map_list_of ( 0, 0x0000000000000000 ) // ( 0, 0x0e00670bu ) // ( 19080, 0xad4e4d29u ) // ( 30583, 0xdc7bf136u ) // ( 99999, 0xf555cfd2u ) // (219999, 0x91b7444du ) ;
recompiled
- removed all the contents of
~/.altcoin/
folder - added
altcoin.conf
- launched
./altcoind
- issued
./altcoind getinfo
- output is still the same - issues
./altcoind setgenerate true 4
- debug.log
output is the same as previously- issued
./altcoind stop
- launched
./altcoind
at this point I it failed again with the same error message
AltCoin Network: genesis=0x00000000324a1b505ecd nBitsLimit=0x1d00ffff nBitsInitial=0x1c00ffff nStakeMinAge=604800 nCoinbaseMaturity=500 nModifierInterval=21600
ERROR: CTxDB::LoadBlockIndex() : Failed stake modifier checkpoint height=0, modifier=0x0000000000000000
checkpoints.cpp
and recompile it again... still the same problem...peercoin master0.5
link . Since it is for educational purposes, I did not submit code to GitHub or anywhere else, Let me know what you need and I will provide it via pastebinaltcoin
forum