Bitcoin Forum
May 10, 2024, 04:22:21 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Warning: One or more bitcointalk.org users have reported that they strongly believe that the creator of this topic is a scammer. (Login to see the detailed trust ratings.) While the bitcointalk.org administration does not verify such claims, you should proceed with extreme caution.
Pages: [1]
  Print  
Author Topic: How to change the merkel hash of some cryptocoin?  (Read 1043 times)
Solidsmart (OP)
Member
**
Offline Offline

Activity: 70
Merit: 10


View Profile
November 10, 2014, 09:54:58 AM
 #1

for example litecoindark, i wanna fork it
1715358141
Hero Member
*
Offline Offline

Posts: 1715358141

View Profile Personal Message (Offline)

Ignore
1715358141
Reply with quote  #2

1715358141
Report to moderator
1715358141
Hero Member
*
Offline Offline

Posts: 1715358141

View Profile Personal Message (Offline)

Ignore
1715358141
Reply with quote  #2

1715358141
Report to moderator
1715358141
Hero Member
*
Offline Offline

Posts: 1715358141

View Profile Personal Message (Offline)

Ignore
1715358141
Reply with quote  #2

1715358141
Report to moderator
"There should not be any signed int. If you've found a signed int somewhere, please tell me (within the next 25 years please) and I'll change it to unsigned int." -- Satoshi
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715358141
Hero Member
*
Offline Offline

Posts: 1715358141

View Profile Personal Message (Offline)

Ignore
1715358141
Reply with quote  #2

1715358141
Report to moderator
1715358141
Hero Member
*
Offline Offline

Posts: 1715358141

View Profile Personal Message (Offline)

Ignore
1715358141
Reply with quote  #2

1715358141
Report to moderator
e1ghtSpace
Legendary
*
Offline Offline

Activity: 1526
Merit: 1001


Crypto since 2014


View Profile WWW
November 10, 2014, 11:08:02 AM
 #2

for example litecoindark, i wanna fork it
Follow this guide: http://devtome.com/doku.php?id=scrypt_altcoin_cloning_guide

You'll also need the genesis mining code. I found it with a quick google.

Here it is:
Quote
    // If genesis block hash does not match, then generate new genesis hash.
    if (true && block.GetHash() != hashGenesisBlock)
    {
        printf("Searching for genesis block...\n");
        // This will figure out a valid hash and Nonce if you're
        // creating a different genesis block:
        uint256 hashTarget = CBigNum().SetCompact(block.nBits).getuint256();
        uint256 thash;

        while(true)
        {
            thash = scrypt_blockhash(BEGIN(block.nVersion));
            if (thash <= hashTarget)
                break;
            if ((block.nNonce & 0xFFF) == 0)
            {
                printf("nonce %08X: hash = %s (target = %s)\n", block.nNonce, thash.ToString().c_str(), hashTarget.ToString().c_str());
            }
            ++block.nNonce;
            if (block.nNonce == 0)
            {
                printf("NONCE WRAPPED, incrementing time\n");
                ++block.nTime;
            }
        }
        printf("block.nTime = %u \n", block.nTime);
        printf("block.nNonce = %u \n", block.nNonce);
        printf("block.GetHash = %s\n", block.GetHash().ToString().c_str());
Source: http://stackoverflow.com/questions/20772606/how-to-create-a-genesis-block-of-my-altercoin
(I added "true &&" to the beginning so it is easier to follow the tutorial.

Place it above block.print() in main.cpp.
Solidsmart (OP)
Member
**
Offline Offline

Activity: 70
Merit: 10


View Profile
November 10, 2014, 11:15:39 AM
 #3

for example litecoindark, i wanna fork it
Follow this guide: http://devtome.com/doku.php?id=scrypt_altcoin_cloning_guide

You'll also need the genesis mining code. I found it with a quick google.

Here it is:
Quote
    // If genesis block hash does not match, then generate new genesis hash.
    if (true && block.GetHash() != hashGenesisBlock)
    {
        printf("Searching for genesis block...\n");
        // This will figure out a valid hash and Nonce if you're
        // creating a different genesis block:
        uint256 hashTarget = CBigNum().SetCompact(block.nBits).getuint256();
        uint256 thash;

        while(true)
        {
            thash = scrypt_blockhash(BEGIN(block.nVersion));
            if (thash <= hashTarget)
                break;
            if ((block.nNonce & 0xFFF) == 0)
            {
                printf("nonce %08X: hash = %s (target = %s)\n", block.nNonce, thash.ToString().c_str(), hashTarget.ToString().c_str());
            }
            ++block.nNonce;
            if (block.nNonce == 0)
            {
                printf("NONCE WRAPPED, incrementing time\n");
                ++block.nTime;
            }
        }
        printf("block.nTime = %u \n", block.nTime);
        printf("block.nNonce = %u \n", block.nNonce);
        printf("block.GetHash = %s\n", block.GetHash().ToString().c_str());
Source: http://stackoverflow.com/questions/20772606/how-to-create-a-genesis-block-of-my-altercoin
(I added "true &&" to the beginning so it is easier to follow the tutorial.

Place it above block.print() in main.cpp.
tnx to u
Solidsmart (OP)
Member
**
Offline Offline

Activity: 70
Merit: 10


View Profile
November 10, 2014, 11:22:55 AM
 #4

i did that all yesterday too,but when i come to testnet, to create merkel ,it just does nothing,i can wait hours
e1ghtSpace
Legendary
*
Offline Offline

Activity: 1526
Merit: 1001


Crypto since 2014


View Profile WWW
November 10, 2014, 08:09:15 PM
 #5

i did that all yesterday too,but when i come to testnet, to create merkel ,it just does nothing,i can wait hours

I normally just skip the test net and go straight to the main net. It is less confusing that way.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!