{"action":"created","issue":{"url":"https://api.github.com/repos/litecoin-project/litecoin/issues/538","repository_url":"https://api.github.com/repos/litecoin-project/litecoin","labels_url":"https://api.github.com/repos/litecoin-project/litecoin/issues/538/labels{/name}","comments_url":"https://api.github.com/repos/litecoin-project/litecoin/issues/538/comments","events_url":"https://api.github.com/repos/litecoin-project/litecoin/issues/538/events","html_url":"https://github.com/litecoin-project/litecoin/issues/538","id":364054677,"node_id":"MDU6SXNzdWUzNjQwNTQ2Nzc=","number":538,"title":"Mining block are not accepted if BIP related values changed to 0 or 1","user":{"login":"adneerav","id":10827664,"node_id":"MDQ6VXNlcjEwODI3NjY0","avatar_url":"https://avatars3.githubusercontent.com/u/10827664?v=4","gravatar_id":"","url":"https://api.github.com/users/adneerav","html_url":"https://github.com/adneerav","followers_url":"https://api.github.com/users/adneerav/followers","following_url":"https://api.github.com/users/adneerav/following{/other_user}","gists_url":"https://api.github.com/users/adneerav/gists{/gist_id}","starred_url":"https://api.github.com/users/adneerav/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adneerav/subscriptions","organizations_url":"https://api.github.com/users/adneerav/orgs","repos_url":"https://api.github.com/users/adneerav/repos","events_url":"https://api.github.com/users/adneerav/events{/privacy}","received_events_url":"https://api.github.com/users/adneerav/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-09-26T14:20:41Z","updated_at":"2018-10-05T08:16:33Z","closed_at":"2018-09-29T08:59:34Z","author_association":"NONE","body":"Hello\r\nI 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.\r\n\r\n\r\nIf 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 : https://goo.gl/JyLPHh\r\n\r\nIf 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. https://goo.gl/hf7uj2\r\n\r\n**Machine specs:**\r\n- OS:Ubuntu 16.0.4\r\n- CPU:i7\r\n- RAM:12GB\r\n- Disk size:250GB\r\n- Disk Type (HD/SDD): SDD\r\n\r\nFor 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)\r\n\r\n\r\nI 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.\r\n\r\nThanks"},"comment":{"url":"https://api.github.com/repos/litecoin-project/litecoin/issues/comments/427283678","html_url":"https://github.com/litecoin-project/litecoin/issues/538#issuecomment-427283678","issue_url":"https://api.github.com/repos/litecoin-project/litecoin/issues/538","id":427283678,"node_id":"MDEyOklzc3VlQ29tbWVudDQyNzI4MzY3OA==","user":{"login":"adneerav","id":10827664,"node_id":"MDQ6VXNlcjEwODI3NjY0","avatar_url":"https://avatars3.githubusercontent.com/u/10827664?v=4","gravatar_id":"","url":"https://api.github.com/users/adneerav","html_url":"https://github.com/adneerav","followers_url":"https://api.github.com/users/adneerav/followers","following_url":"https://api.github.com/users/adneerav/following{/other_user}","gists_url":"https://api.github.com/users/adneerav/gists{/gist_id}","starred_url":"https://api.github.com/users/adneerav/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adneerav/subscriptions","organizations_url":"https://api.github.com/users/adneerav/orgs","repos_url":"https://api.github.com/users/adneerav/repos","events_url":"https://api.github.com/users/adneerav/events{/privacy}","received_events_url":"https://api.github.com/users/adneerav/received_events","type":"User","site_admin":false},"created_at":"2018-10-05T08:16:33Z","updated_at":"2018-10-05T08:16:33Z","author_association":"NONE","body":"Hello @losh11 \r\nThanks for responding.\r\n\r\nI 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 .\r\n\r\n\r\nI am creating AltCoin from litecoin source.And using GenesisHO generating genesis block details like nonce ,genesis hash , merkle etc.\r\n\r\nWhile 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.\r\n\r\n`static const int COINBASE_MATURITY = 2;`\r\n\r\nI've done changes regarding genesis , nonce, coins for genesis block.\r\n`genesis = CreateGenesisBlock(1538404994, 2086003386, 0x1e0ffff0, 1, 50000 * COIN);\r\n`\r\neg. 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.\r\n\r\nI'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.\r\n\r\nAfter all above change in source,I've build daemon ,cli ,tx and qt from same source.\r\n\r\n**Next**\r\nFrom 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.\r\n\r\n**_Result of above :_**\r\nAfter execution of `coin-cli generate 1` genesis coins are generated.Displayed in wallet and account under account name \"\"\r\n\r\nStarted Mining (using cpuminer) which has another account's address. And after few blocks genesis block coins converted to mature state\r\n\r\n> **Problem/Issue**\r\n\r\n    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.\r\n\r\nSo where do I need to make other changes to make that genesis coin spendable.\r\n\r\n    Transactions details Image:: https://i.stack.imgur.com/Yk67i.png\r\n    Balance details from qt wallet and command : https://i.stack.imgur.com/cacZ6.png\r\n\r\nI've tried & follow steps from [this answer](https://bitcoin.stackexchange.com/questions/10009/why-can-t-the-genesis-block-coinbase-be-spent/79064#79064) too After updating as per from above answer in validation.cpp : [Updated validation.cpp](https://gist.github.com/adneerav/d591267c422850cbff842652341afd8b)\r\n\r\n\r\nSecond try : I also tried with another [answer given by same user](https://bitcoin.stackexchange.com/a/79810/54360) for litecoin source changes.But facing same issue.\r\n\r\n[validation.cpp](https://gist.github.com/adneerav/207b36f12edd4f914e6365b43d5727d2) after updating as per second try answer\r\n[Screens of same updates](https://imgur.com/a/yTy9Qqa)\r\n\r\n\r\n> 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\r\n\r\nIf anyone can help me or guide me on this ?\r\n\r\nThanks\r\n"}}
{"actor":{"display_login":"adneerav"}}