-
Notifications
You must be signed in to change notification settings - Fork 474
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
SHA 256 MERKLE ROOT problem. #38
Comments
Thanks for your reply, It seems like im using this script wrong i guess. Im using ubuntu and edit the values in the script directly. I use this command to output the Pubkey hex : This is how i search for my hash, Am i doing something wrong or ? It seems like the script is getting the wrong merkle hash and is hashing a genesisblock, but once i change the merkle hash to the one you provided and is in my debug log, it says wrong genesishash ... |
May be you have some parameter diff. //// debug print
if(block.GetHash()!=hashGenesisBlock){
uint256 powhash=block.GetPoWHash();
while (powhash > bnProofOfWorkLimit.getuint256()){
if (++block.nNonce==0) break;
powhash = block.GetPoWHash();
}
printf("HASH WE NEED 0x%s\n", block.GetHash().ToString().c_str());
printf("hashGenesisBlock 0x%s\n", hashGenesisBlock.ToString().c_str());
printf("MerkleRoot 0x%s\n", block.hashMerkleRoot.ToString().c_str());
printf("nNounce %d\n",block.nNonce);
}
assert(block.hashMerkleRoot == uint256("zaobi-genesis-merkleroot"));
block.print();
assert(block.GetHash() == hashGenesisBlock); Build and running your wallet(need some time,first run), |
Hello, Thanks for your reply,
I sorted it out , used your python code from github, had something to do
with the UTF-8, now it's hashing the correct parameters.
THanks.
2018-04-25 17:10 GMT+02:00 followtheart <[email protected]>:
… May be you have some parameter diff.
If you have trouble with this scripts.
you can also add some code like below in function InitBlockIndex(Litecoin)
//// debug print
if(block.GetHash()!=hashGenesisBlock){
uint256 powhash=block.GetPoWHash();
while (powhash > bnProofOfWorkLimit.getuint256()){
if (++block.nNonce==0) break;
powhash = block.GetPoWHash();
}
printf("HASH WE NEED 0x%s\n", block.GetHash().ToString().c_str());
printf("hashGenesisBlock 0x%s\n", hashGenesisBlock.ToString().c_str());
printf("MerkleRoot 0x%s\n", block.hashMerkleRoot.ToString().c_str());
printf("nNounce %d\n",block.nNonce);
}
assert(block.hashMerkleRoot == uint256("zaobi-genesis-merkleroot"));
block.print();
assert(block.GetHash() == hashGenesisBlock);
Build and running your wallet(need some time,first run),
You will get an usable genesis block in debug logs.
always works.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#38 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/Ak6DXNJrM1y9bcTQRaiANyhx_qBvIZuzks5tsJHXgaJpZM4TiC0h>
.
|
Hey, what do mean UTF-8 issue? I'm getting the same assertion error you were getting after compiling
|
Hi there. Do you mind sharing what the issue was with UTF-8 and how you resolved it? Im having the same issue with the GenesisH0 script but for scrypt. Thank you |
Hello,
When i try to run my coin-qt i'l get this error.
Terminal :
Code:
Debug log :
Code:
I have created a genenis hash for the main net and test net using the script but cannot get it to work..
Using the following data :
TEST NET :
It seems that something is wrong with the merkle root, any solutions , or am i doing something wrong here ?
Greetings Dave.
The text was updated successfully, but these errors were encountered: