forked from litecoin-project/litecoin
-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update chain params to use new Genesis / Merkle hash
- Loading branch information
Showing
1 changed file
with
10 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1150d94
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the chainparams.cpp there are other instances of the checkpoint data (litecoin version 17)
checkpointData = { { { 1500, uint256S("0x841a2965955dd288cfa707a755d05a54e45f8bd476835ec9af4402a2b59a2967")}, { 4032, uint256S("0x9ce90e427198fc0ef05e5905ce3503725b80e26afd35a987965fd7e3d9cf0846")}, { 8064, uint256S("0xeb984353fc5190f210651f150c40b8a4bab9eeeff0b729fcb3987da694430d70")}, { 16128, uint256S("0x602edf1859b7f9a6af809f1d9b0e6cb66fdc1d4d9dcd7a4bec03e12a1ccd153d")}, { 23420, uint256S("0xd80fdf9ca81afd0bd2b2a90ac3a9fe547da58f2530ec874e978fce0b5101b507")}, { 50000, uint256S("0x69dc37eb029b68f075a5012dcc0419c127672adb4f3a32882b2b3e71d07a20a6")}, { 80000, uint256S("0x4fcb7c02f676a300503f49c764a89955a8f920b46a8cbecb4867182ecdb2e90a")}, {120000, uint256S("0xbd9d26924f05f6daa7f0155f32828ec89e8e29cee9e7121b026a7a3552ac6131")}, {161500, uint256S("0xdbe89880474f4bb4f75c227c77ba1cdc024991123b28b8418dbbf7798471ff43")}, {179620, uint256S("0x2ad9c65c990ac00426d18e446e0fd7be2ffa69e9a7dcb28358a50b2b78b9f709")}, {240000, uint256S("0x7140d1c4b4c2157ca217ee7636f24c9c73db39c4590c4e6eab2e3ea1555088aa")}, {383640, uint256S("0x2b6809f094a9215bafc65eb3f110a35127a34be94b7d0590a096c3f126c6f364")}, {409004, uint256S("0x487518d663d9f1fa08611d9395ad74d982b667fbdc0e77e9cf39b4f1355908a3")}, {456000, uint256S("0xbf34f71cc6366cd487930d06be22f897e34ca6a40501ac7d401be32456372004")}, {638902, uint256S("0x15238656e8ec63d28de29a8c75fcf3a5819afc953dcd9cc45cecc53baec74f38")}, {721000, uint256S("0x198a7b4de1df9478e2463bd99d75b714eab235a2e63e741641dc8a759a9840e5")}, } };
and
are these okay to leave as is?
Thanks for the guide, btw!
1150d94
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1150d94
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you toolboc.
I have build the Cryptocurrency using your guide. Thank you very much.
I will be sure to comment out all the checkpoint data.
All the best to you for taking the time to share your experience.
1150d94
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, I'm trying to produce the Genesis Block and Merkle Root for faithcoin, but the GenesisH0 script is outdated, shows me alot of errors. Please, is there any other way I can fix this? Probably by a similar script, please
1150d94
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bashirk , it sounds like the issue is with the GenesisH0 script, you may want to file an issue on lhartikk's repo.
1150d94
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Many thanks for the feedback, @toolboc. But the script seems to be unmaintained, as there are related issues that are still open. Is there any other script you could recommend?
I came across genesis-block, But it seems to be unmaintained too :(
1150d94
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bashirk - It looks like the GenesisH0 script is written for Python 2. The code change is relatively straight forward, but as of this comment someone has opened a PR to fix it lhartikk/GenesisH0#48. Given the simple nature of the script you can probably just fork the repo or copy/paste this PR locally.
1150d94
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I used Python && pip (apt-get install -qq python python-pip) and it worked like that. Do not use python3 or pip3.
1150d94
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have created new genesis but getting some issues like
Assertion failed!
Program: \usr\src\aa\mudracoin\src\mudracoin-tx.exe
File: chainparams.cpp, Line 124
Expression: consensus.hashGenesisBlock == uint256S("0x45154a058474c37337bacff3868b61a4bfa9be5c11c0baaeb6264ecf06b79532")
I don't know what I am doing wrong or my genesis code are wrong. PLEASE check my repository. let me know that error
1150d94
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For me a lot of the time it was my checkpoint data that threw that error.
The RegTest doesn't need to be altered really.
Basically what it's saying to you is: "With the numbers you've provided me in chainparams.cpp, I can't come up with the same numbers as you." Which means you've filled out some of the numbers incorrectly. The assertions take your input numbers in chainparams, and perform a calculation to see if they get the same outputs as you. So either you missed some data, forgot to replace the BIP data, the checkpoints, or something else on that page generally.
Also, in
src/qt/test/rpcnestedtests.cpp
is a merkle you need to replace as well.1150d94
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You might be right. I think that because of I didn't put Time and Nonce at same while creating genesis. Let me try this work again.
1150d94
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
but still same. no luck I tried doing it ....
root@DESKTOP-0HJLS87:/usr/src/newupdate/GenesisH0# python genesis.py -a scrypt -z "I fear not the man who has practiced 10,000 kicks once, but I fear the man who has practiced one kick 10,000 times." -p "04678afdb0fe5548271967f1a67130b7105cd6a828e03909a67962e0ea1f61deb649f6bc3f4cef38c4f35504e51ec112de5c384df7ba0b8d578a4c702b6bf11d5f" -t 1624379279 -n 351450
04ffff001d01044c73492066656172206e6f7420746865206d616e2077686f20686173207072616374696365642031302c303030206b69636b73206f6e63652c206275742049206665617220746865206d616e2077686f2068617320707261637469636564206f6e65206b69636b2031302c3030302074696d65732e
algorithm: scrypt
merkle hash: 28c32c327942d1d95e8c59eda8914c1d57089593ac5a06750f362ee8d0c0eeed
pszTimestamp: I fear not the man who has practiced 10,000 kicks once, but I fear the man who has practiced one kick 10,000 times.
pubkey: 04678afdb0fe5548271967f1a67130b7105cd6a828e03909a67962e0ea1f61deb649f6bc3f4cef38c4f35504e51ec112de5c384df7ba0b8d578a4c702b6bf11d5f
time: 1624379279
bits: 0x1e0ffff0
Searching for genesis hash..
genesis hash found!
nonce: 351450
genesis hash: 45154a058474c37337bacff3868b61a4bfa9be5c11c0baaeb6264ecf06b79532
I put it same in Chainparams
why it look like i get less count of nonce number.
1150d94
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are many more that you have to replace in that file. You need to replace the checkpoint data. Almost all of those hashes throughout the entire source code need to be modified. Also, the address hexes need to be modified too. I don't have the file in front of me but there are many more than you have replaced in that file. And it's also not at simple as search and replace. Some of the items you have to replace are not SEARCH & Replaceable, because they have alternate values. The checkpoint data means that after so many blocks, it creates a new checkpoint. Which means it's not the same repetitive search&replace data.
consensus.BIP34Hash
needs to be replaced with your values.consensus.defaultAssumeValid = uint256S("0xREPLACE WITH YOUR HASH VALUE");
Finally, make sure your base58Prefixes are not rubbish, as that will also account for messing up the compile. Trust me on this all, I spent a week doing this :)
I think that's all, but you have to repeat for the TestNet too. Not RegTest, if I remember properly. That may not be all. I'm not 100% sure that's all. Also, did you create the testnet genesis hash and the regtest hash values as well? Anyway, I think that's about all I can guide you on. Good luck!
1150d94
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks that's lot of info.. I found what I was doing wrong. I was making Genesis algorithm: scrypt instead of algorithm: sha256. I won't give up this easy. π
1150d94
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You used
python genesis.py -a SHA256 -z....
and that worked? would be great to get more info to your solution so others, like me have a fix.