Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mining block are not accepted if BIP related values changed to 0 or 1 #538

adneerav opened this issue Sep 26, 2018 · 2 comments

Mining block are not accepted if BIP related values changed to 0 or 1 #538

adneerav opened this issue Sep 26, 2018 · 2 comments


Copy link

@adneerav adneerav commented Sep 26, 2018

I am creating own alt from litecoin source. So I have changed hashGenesisBlock , hashMerkleRoot , nonce , timestamp etc.Things are working fine if i dont make BIP34Height , BIP65Height , BIP66Height & BIP34Hash value to 1 . While doing mining using cpuminer generated hash/blocks are not accepting and thats why blocks are not getting generated/added.

If I change that BIP( BIP34Height , BIP65Height & BIP66Height and BIP34Hash) values(not default which is litecoin values), that generated hash/block should be accepted from cpu miner or any other third party mining binary. I've tried by setting value to 0 & 1 both but same result things are not working as expected.. Here is log URL generated from mining :

If I don't change that BIP values things are working fine.Generated blocks are accepted to add.Please check log which is generated from mining process.

Machine specs:

  • OS:Ubuntu 16.0.4
  • CPU:i7
  • RAM:12GB
  • Disk size:250GB
  • Disk Type (HD/SDD): SDD

For testing and initial setup i am doing things on LAN.All things are working fine if i don't change BIP values only(changing only genesis , merke minimum chain etc)

I know for this BIP related conceptual should be clear but I've not found any example & proper documentation so I came here to make things clear if anyone can provide more details/document/blogs and help me to solve this things.



This comment has been minimized.

Copy link

@losh11 losh11 commented Sep 29, 2018

Hi, unfortunately this issues section is only for the litecoin-project and specifically for issues related to the reference client, Litecoin Core. Therefore we are unable to help with altcoin development. Perhaps you should try asking a question on the Bitcoin Stackexchange?

Closing for now.

@losh11 losh11 closed this Sep 29, 2018

This comment has been minimized.

Copy link

@adneerav adneerav commented Oct 5, 2018

Hello @losh11
Thanks for responding.

I am leaving comment here.I can understand Repo's member can't reply on this type of issue but in case if anyone else facing this issue and found solution please respond .

I am creating AltCoin from litecoin source.And using GenesisHO generating genesis block details like nonce ,genesis hash , merkle etc.

While generating genesis block I have changed the coin value parameters in genesis coin value. that is -v parameters and generated genesis hash and merkle etc.

static const int COINBASE_MATURITY = 2;

I've done changes regarding genesis , nonce, coins for genesis block.
genesis = CreateGenesisBlock(1538404994, 2086003386, 0x1e0ffff0, 1, 50000 * COIN);
eg. I want to premine 50,000 coins in genesis block. I don't want give condition in validation.cpp like if block height 1 than reward should be 50,000.

I've generated pub key and used the same pub key while generating genesis hash.So I can use that genesis block coins by importing private key of that pub key.

After all above change in source,I've build daemon ,cli ,tx and qt from same source.

From cli I have executed command(coin-cli generate 1) to generate one block so I can get genesis block coin(Yes!! initially it will be in immature state after x(which I've set to 1) amount of block it will be in mature state). And imported that private key in wallet.

Result of above :
After execution of coin-cli generate 1 genesis coins are generated.Displayed in wallet and account under account name ""

Started Mining (using cpuminer) which has another account's address. And after few blocks genesis block coins converted to mature state


Now when i tried to transfer from that genesis block coins(are in mature and available to spend) its not transferring to any address.Its not displaying in qt wallet but using cli command its displaying balance.

So where do I need to make other changes to make that genesis coin spendable.

Transactions details Image::
Balance details from qt wallet and command :

I've tried & follow steps from this answer too After updating as per from above answer in validation.cpp : Updated validation.cpp

Second try : I also tried with another answer given by same user for litecoin source changes.But facing same issue.

validation.cpp after updating as per second try answer
Screens of same updates

Well I know this is not something related to altgeneration script(script work is awesome :) ) related issue. But in this script initial coin mining is configured as a block reward(at height 1) so i just want to what are the changes required if i want to mine coin as a premine not insta mine

If anyone can help me or guide me on this ?


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
2 participants
You can’t perform that action at this time.