I have set blockgeneration time to 15 second but blocks are generated with the speed of 1 block per min(avg)

0

I have forked Litcoin 0.8v to make my own costomized coin(learning purpose), with some changes in parameters:

1. Total no of coins to be mined = 270,000,000. 
2. Block formation time = 15sec. 
3. Time for halving = 2 years. 
4. Life span for mining = 20 years. 
5. Mining reward coins per block for first 2 years = 32.16899445. 
6. Total no of coins to be mined in first 2 years = 135264187.8669276

Every thing is working ok but blockgeneration time seems to be too slow. Though conformation time of 15 sec is just an avg value but in my case i am getting conformation in every 2 to 3 min which is far beyond expected

Edit:I have set my difficulty to be as low as possible which is around 0.002 and retargeting time is set to 10 min, but even after of 3 days of minning i got somewhere around 3400 blocks,and also its difficulty is same in every block though i am doing number of transaction within nodes.

{
    "version" : 80705,
    "protocolversion" : 70002,
    "walletversion" : 60000,
    "balance" : 17474.98800000,
    "blocks" : 3407,
    "timeoffset" : 0,
    "connections" : 2,
    "proxy" : "",
    "difficulty" : 0.00024414,
    "testnet" : false,
    "keypoololdest" : 1516853983,
    "keypoolsize" : 102,
    "paytxfee" : 0.00000000,
    "mininput" : 0.00001000,
    "errors" : ""
}

cryptoKTM

Posted 2018-01-29T10:28:29.193

Reputation: 489

How many blocks have you actually mined? You might not have even hit the difficulty retargetingMeshCollider 2018-01-29T10:34:50.077

this is the result of 3 days of minning with 4 nodes: { "version" : 80705, "protocolversion" : 70002, "walletversion" : 60000, "balance" : 17474.98800000, "blocks" : 3325, "timeoffset" : 0, "connections" : 2, "proxy" : "", "difficulty" : 0.00024414, "testnet" : false, "keypoololdest" : 1516853983, "keypoolsize" : 102, "paytxfee" : 0.00000000, "mininput" : 0.00001000, "errors" : "" } @MeshCollidercryptoKTM 2018-01-29T10:38:41.220

Answers

2

Changing just the target block generation time does not mean that the average block interval will be that time. The block interval is governed by the Proof of Work target, and there is a limit to what that target can be. If you do not increase that target's limit, then the target will not be able to increase to the point where your blocks are being mined at the rate you want them to be mined at. You need to increase your target limit (it can be found in chainparams.cpp and is called powLimit) so that blocks can be found more quickly.

Andrew Chow

Posted 2018-01-29T10:28:29.193

Reputation: 40 910

thanks @andrewChow for the help. Theres no file named chainparams.cpp and no variable named powLimit in entire project. You mght have gone through diffrent version of code.ps: I have forked on Litecoin 0.8cryptoKTM 2018-01-30T06:53:09.503

Why did you fork from such an old version?Andrew Chow 2018-01-30T07:23:01.487

that was my mistake.I guess i have to switch to another version. can you advice me which version should i go for? And why is older version not recomended ? @andrew chowcryptoKTM 2018-01-30T07:46:39.820

1You should be using the latest version. Old versions are vulnerable to many attacks and have performance issues. Not to mention that the dependencies they use are also outdated and have had many changes, including security fixes.Andrew Chow 2018-01-30T17:10:04.583