Bitcoin Forum
December 12, 2024, 01:47:48 PM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: « 1 2 3 4 5 [6]  All
  Print  
Author Topic: More Genesis Block Discussion  (Read 33952 times)
freemanjackal
Sr. Member
****
Offline Offline

Activity: 378
Merit: 250


View Profile
June 16, 2017, 05:01:19 PM
 #101

i was able to compile and make some modifications, but when i execute litecoind, it obviously give me the error genesisblock does not match, everything fine until there,
what i am not being able to find the debug.log file, it supposes it is created a .litecoin folder where the log file should it be, but the .litecoin folder in home it is not being created...
so i would like some enlightment in this part, anyone could help me? thanks
vlom
Legendary
*
Offline Offline

Activity: 1498
Merit: 1117


View Profile
July 27, 2017, 03:23:31 PM
 #102

What I did so far:

Change pszTimestamp to a sentence from newspaper
change block.nTime to current time

compile

run compiled source with -testnet -noirc

now u see some lines and a crash
Code:
b115383690ee67ebeef9a7e754342638cd7bbf488561998e6d1bc1ed367484f6 // Block derived from pszTimestamp
b8fa883689f099d3942ff73439d9f55d60a5e257b0d69a8f0f6ab4572ecff415 // Genesisblock (invalid cuz its already coded wrong)
bd58bf217abb76059de07dc519f6c3dcdf5b1a7bb9219a66d24205e08f3716f9 // MerkleRoot (Valid because its newly calculated

corresponding to code:
Code:
        //// debug print
        printf("%s\n", block.GetHash().ToString().c_str());
        printf("%s\n", hashGenesisBlock.ToString().c_str());
        printf("%s\n", block.hashMerkleRoot.ToString().c_str());
        assert(block.hashMerkleRoot == uint256("0xbd58bf217abb76059de07dc519f6c3dcdf5b1a7bb9219a66d24205e08f3716f9"));

update main.cpp with the mentioned merkleroot (it crashed because of the last assert) and run again

you should have already changed the false to true in
Code:
        // If genesis block hash does not match, then generate new genesis hash.
        if (true && block.GetHash() != hashGenesisBlock)

so it will find a genesis block for your string

after a long time you get:
Code:
nonce 003C1000: hash = e8525d8ae8a74a33dbc4b06a64c97ced84dfd29628b3e9e4197c7030cc4a09d3 (target = 00000ffff0000000000000000000000000000000000000000000000000000000)
block.nTime = 1367704866
block.nNonce = 3939341
block.GetHash = fafdbfc957ea6867a0743ff80c4ae126c7dd9fa82057255228a4d58f6ccfdf33
CBlock(hash=fafdbfc957ea6867a074, PoW=000000b1398554a520b5, ver=1, hashPrevBlock=00000000000000000000, hashMerkleRoot=bd58bf217a, nTime=1367704866, nBits=1e0ffff0, nNonce=3939341, vtx=1)
  CTransaction(hash=bd58bf217a, ver=1, vin.size=1, vout.size=1, nLockTime=0)
    CTxIn(COutPoint(0000000000, -1), coinbase 04ffff001d01043741442e6e6c20342f352042657672696a64696e6773646167207a6f6e6e69672c20646161726e61206f6f6b207a6f6d657273207761726d)
    CTxOut(error)
  vMerkleTree: bd58bf217a
xx: main.cpp:2070: bool LoadBlockIndex(bool): Assertion `block.GetHash() == hashGenesisBlock' failed.
Aborted (core dumped)

Now you have the valid Genesisblock and nNonce:
block.nNonce = 3939341
block.GetHash = fafdbfc957ea6867a0743ff80c4ae126c7dd9fa82057255228a4d58f6ccfdf33

Update your code with these values and your ready to go!



i have to reactivate this topic. i am playing with coin-cloning an now i am stuck at the MerkleRoot-part.

The app crashes and in terminal i got this:

Code:
Assertion failed: (block.hashMerkleRoot == uint256("0x")), function LoadBlockIndex, file main.cpp, line 2031.
Abort trap: 6

and according to this how-to (https://gist.github.com/mhsjlw/8130158de01071aa8c87) i should find the hash in a log file. but in the only corresponding log file i found i only have this.

Quote
c6e32eac75316aa6be562726b219fac84560439fea1c819550fb95abbeb23582
5813d4cfab0eeda94a15d11c5e7d6895e667fbbe67c59ef9a1b3bc232c9a0b7f
c12f442c067f5c64e58e294d423c36b42201801a55ed551fa0d4da57b1810651

the how-to says i should have something like this:

Quote
Thanks to tyrion's amazingly helpful post, we can decipher this debug out put as so:

b1753ec3845a48ddc4618bc595af6dc89dac328cd48f9f8db178df5dd3b302fc Block hashed using the non-existent Merkel, based on the pzTimestamp from main.cpp
0000000000000000000000000000000000000000000000000000000000000000 Genesis block, no good because all the nNonces are set to 0 in main.cpp
2fc1b7ef46270c053711fbae934cf7f83378efd4b3e158079451d9c6c90e4700 Valid Merkel Hash, generated using the epoch time in main.cpp


or is one off the three lines above the hash i need?

thank you.

EDIT: i got it, reformatting the text from the how-to solves the problem.... the third line is the hash i need.
maiiyeuchong
Newbie
*
Offline Offline

Activity: 3
Merit: 0


View Profile
November 06, 2017, 01:03:59 AM
 #103

I need to help. I have created a coin for myself, but when sent, can not receive. Why wallet contacted the system it has multiple ports connected to it
http://fs5.directupload.net/images/171105/uncttku6.png
http://fs5.directupload.net/images/171105/i8qqsing.png
http://fs1.directupload.net/images/171105/el82all8.png
Bobby_Atlas
Full Member
***
Offline Offline

Activity: 132
Merit: 100

Walking alone in the darkness


View Profile
December 27, 2017, 06:32:13 PM
 #104

Is there any options or script or maybe somebody know how to midify Genesis H0 to get Genesis block for blake256 algo?
Bobby_Atlas
Full Member
***
Offline Offline

Activity: 132
Merit: 100

Walking alone in the darkness


View Profile
December 28, 2017, 02:21:25 AM
 #105

Guys really need your help, i've downloaded linked above script, added blake-256 hashing algo there, but how to tell that script to use extranonce and nversion as options while it generates merkle and hash?


Will be really appriciated for help and give bounty on coin start!
Tokenista
Member
**
Offline Offline

Activity: 910
Merit: 14

Everyone join Blurt.blog & Steemit.com


View Profile
August 25, 2018, 07:35:55 AM
 #106

Ethereum Smart Contract pre-compiled
https://github.com/satansdeer/ethereum-token-tutorial
realdantreccia
Hero Member
*****
Offline Offline

Activity: 667
Merit: 517


Fuck BlackRock


View Profile WWW
March 03, 2022, 09:58:08 PM
 #107

lightenup gave me this advice for generating a genesis block:

Awww, that is cheating!

You really have no business creating your own block chain if you don't understand the code well enough to figure out how to mine a new genesis block without somebody else's help.


Shots fired @BillyMarkus!!! That's part of the devtome guide. BOOO GAVIN BOOO!

https://www.devtome.com/doku.php?id=scrypt_altcoin_cloning_guide&rev=1391981820#genesis_blocks

From the many one, from one, the source
Pages: « 1 2 3 4 5 [6]  All
  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!