pixel (OP)
Member
Offline
Activity: 98
Merit: 10
x1 7970 | Aprox. 587 kh/s
|
|
April 14, 2013, 12:34:35 AM |
|
Not that it's completely relevant... but I have been in programming for over 20 years. I'll keep researching and reading code... if nothing else, I will try to decode the process as much as I can and relay all the information back here.... unless a dev comes in and goes "Oh.. 1, 2, 3... Done!".
Awesome, thanks for your help so far. Would have never gotten to this point. Can't wait to see how this all turns out, amazing thread.
|
Currently Mining: Litecoin, Xencoin, and Worldcoin (Just because its fun!, don't yell at me ;_;)
|
|
|
Remember remember the 5th of November
Legendary
Offline
Activity: 1862
Merit: 1011
Reverse engineer from time to time
|
|
April 14, 2013, 12:58:33 AM |
|
Got some info from the devs of Bitcoin. Apparently this whole ordeal with Serialization is so that the data from this code const char* pszTimestamp = "The Times 03/Jan/2009 Chancellor on brink of second bailout for banks"; CTransaction txNew; txNew.vin.resize(1); txNew.vout.resize(1); txNew.vin[0].scriptSig = CScript() << 486604799 << CBigNum(4) << vector<unsigned char>((const unsigned char*)pszTimestamp, (const unsigned char*)pszTimestamp + strlen(pszTimestamp)); txNew.vout[0].nValue = 50 * COIN; txNew.vout[0].scriptPubKey = CScript() << ParseHex("04678afdb0fe5548271967f1a67130b7105cd6a828e03909a67962e0ea1f61deb649f6bc3f4cef38c4f35504e51ec112de5c384df7ba0b8d578a4c702b6bf11d5f") << OP_CHECKSIG; is converted to bytes without caring what datatype they are from.
|
BTC:1AiCRMxgf1ptVQwx6hDuKMu4f7F27QmJC2
|
|
|
wmikrut
|
|
April 14, 2013, 01:02:06 AM |
|
Line 2011 of main.cpp block.hashMerkleRoot = block.BuildMerkleTree(); https://bitcointalk.org/index.php?topic=171355.0Final post from maaku Looks like the Merkle root is created and output in the debug.log file
|
I will NEVER ask for any kind of funds up front in a buy/sale of anything on bitcointalk.
BM-2cTFihJKmSwusMAoYuUHPvpx56Jozv64KK
|
|
|
|
pixel (OP)
Member
Offline
Activity: 98
Merit: 10
x1 7970 | Aprox. 587 kh/s
|
|
April 14, 2013, 01:10:58 AM |
|
*eats popcorn* Im exited
|
Currently Mining: Litecoin, Xencoin, and Worldcoin (Just because its fun!, don't yell at me ;_;)
|
|
|
Remember remember the 5th of November
Legendary
Offline
Activity: 1862
Merit: 1011
Reverse engineer from time to time
|
|
April 14, 2013, 01:12:55 AM |
|
Of course it does, that script basically takes an ALREADY CREATED merkle root, i.e the one you claim is output in debug.log. Personally, I would like to write a C implementation where you provide some input and a genesis block will be created for you.
|
BTC:1AiCRMxgf1ptVQwx6hDuKMu4f7F27QmJC2
|
|
|
pixel (OP)
Member
Offline
Activity: 98
Merit: 10
x1 7970 | Aprox. 587 kh/s
|
|
April 14, 2013, 01:25:37 AM |
|
Should I open an IRC channel on freenode for this subject/thread? I just crossed my mind as something that may be a good idea
|
Currently Mining: Litecoin, Xencoin, and Worldcoin (Just because its fun!, don't yell at me ;_;)
|
|
|
Garr255
Legendary
Offline
Activity: 938
Merit: 1000
What's a GPU?
|
|
April 14, 2013, 01:26:51 AM |
|
Of course it does, that script basically takes an ALREADY CREATED merkle root, i.e the one you claim is output in debug.log. Personally, I would like to write a C implementation where you provide some input and a genesis block will be created for you. So do it! Haha I remember a few years ago I tried to make GarrCoin (In a similar situation as you, OP, bored and in high school haha) I got stuck at the genesis block as well. I'll be following this!
|
“First they ignore you, then they laugh at you, then they fight you, then you win.” -- Mahatma Gandhi
Average time between signing on to bitcointalk: Two weeks. Please don't expect responses any faster than that!
|
|
|
wmikrut
|
|
April 14, 2013, 01:30:29 AM |
|
Of course it does, that script basically takes an ALREADY CREATED merkle root, i.e the one you claim is output in debug.log. Personally, I would like to write a C implementation where you provide some input and a genesis block will be created for you. So if I understand correctly... (more likely it's more complex... maybe not). The genesis block is created. Merkle root is created and output in the debug.log find_genesis is run to get the Time Stamp, Nonce and Hash This is all put back into the code (With Merkle value) and compiled We are ready to mine.
|
I will NEVER ask for any kind of funds up front in a buy/sale of anything on bitcointalk.
BM-2cTFihJKmSwusMAoYuUHPvpx56Jozv64KK
|
|
|
Garr255
Legendary
Offline
Activity: 938
Merit: 1000
What's a GPU?
|
|
April 14, 2013, 01:32:01 AM |
|
Should I open an IRC channel on freenode for this subject/thread? I just crossed my mind as something that may be a good idea
/join #noobcoin
|
“First they ignore you, then they laugh at you, then they fight you, then you win.” -- Mahatma Gandhi
Average time between signing on to bitcointalk: Two weeks. Please don't expect responses any faster than that!
|
|
|
Remember remember the 5th of November
Legendary
Offline
Activity: 1862
Merit: 1011
Reverse engineer from time to time
|
|
April 14, 2013, 01:34:41 AM |
|
Of course it does, that script basically takes an ALREADY CREATED merkle root, i.e the one you claim is output in debug.log. Personally, I would like to write a C implementation where you provide some input and a genesis block will be created for you. So if I understand correctly... (more likely it's more complex... maybe not). The genesis block is created. Merkle root is created and output in the debug.log find_genesis is run to get the Time Stamp, Nonce and Hash This is all put back into the code (With Merkle value) and compiled We are ready to mine. I think it's basically this. This is the code from Bitcoin for creating the genesis block's coinbase. const char* pszTimestamp = "The Times 03/Jan/2009 Chancellor on brink of second bailout for banks"; CTransaction txNew; txNew.vin.resize(1); txNew.vout.resize(1); txNew.vin[0].scriptSig = CScript() << 486604799 << CBigNum(4) << vector<unsigned char>((const unsigned char*)pszTimestamp, (const unsigned char*)pszTimestamp + strlen(pszTimestamp)); txNew.vout[0].nValue = 50 * COIN; txNew.vout[0].scriptPubKey = CScript() << ParseHex("04678afdb0fe5548271967f1a67130b7105cd6a828e03909a67962e0ea1f61deb649f6bc3f4cef38c4f35504e51ec112de5c384df7ba0b8d578a4c702b6bf11d5f") << OP_CHECKSIG;
Which outputs this merkle 4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b(though not sure if it needs to big or little endian). Then #!/usr/bin/env python
from hashlib import sha256
VERSION = '01000000'.decode('hex') PREVBLOCK = '00'.decode('hex') * 32 MERKLEROOT = '4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b'.decode('hex') DIFFICULTY = 'ffff001d'.decode('hex')
def block_hash(unixtime, nonce): unixtime = hex(unixtime)[2:].decode('hex')[::-1] nonce = hex(nonce)[2:] nonce = '0'*(8-len(nonce)) + nonce nonce = nonce.decode('hex')[::-1] return sha256(sha256( VERSION + PREVBLOCK + MERKLEROOT + unixtime + DIFFICULTY + nonce ).digest()).digest()
unixtime = 1356123600 nonce = 0 print "Starting at unixtime %d and nonce %d" % (unixtime, nonce) while block_hash(unixtime, nonce)[-4:] != '\x00\x00\x00\x00': nonce = nonce+1 if nonce > 4294967295: unixtime, nonce = unixtime+1, 0 print "Advancing to unixtime %d and nonce %d" % (unixtime, nonce) elif 0 == (nonce%100000): print nonce
print 'Found block!' print "UNIXTIME: %d" % unixtime print "NONCE: %d" % nonce print "HASH: %s" % block_hash(unixtime, nonce)[::-1].encode('hex')
|
BTC:1AiCRMxgf1ptVQwx6hDuKMu4f7F27QmJC2
|
|
|
wmikrut
|
|
April 14, 2013, 01:52:54 AM |
|
Hmmm...... Seems like you compile the client and run it. Extract merkle root value. run find genesis. gather nonce info... locating the 'genesis' info. reload back into code. compile. run with -server mine away... I will try going down this road and see where it goes. will report back soon!!
|
I will NEVER ask for any kind of funds up front in a buy/sale of anything on bitcointalk.
BM-2cTFihJKmSwusMAoYuUHPvpx56Jozv64KK
|
|
|
pixel (OP)
Member
Offline
Activity: 98
Merit: 10
x1 7970 | Aprox. 587 kh/s
|
|
April 14, 2013, 01:55:06 AM |
|
Hmmm...... Seems like you compile the client and run it. Extract merkle root value. run find genesis. gather nonce info... locating the 'genesis' info. reload back into code. compile. run with -server mine away... I will try going down this road and see where it goes. will report back soon!! Awesome, cant wait to hear results!
|
Currently Mining: Litecoin, Xencoin, and Worldcoin (Just because its fun!, don't yell at me ;_;)
|
|
|
bob777fred
|
|
April 14, 2013, 01:56:09 AM |
|
Eagerly awaiting this new weekend-coin, buahaha. So glad to see you are getting support from others in creating this, please keep us updated, I will totally mine for fun when it launches.
|
|
|
|
pixel (OP)
Member
Offline
Activity: 98
Merit: 10
x1 7970 | Aprox. 587 kh/s
|
|
April 14, 2013, 02:04:23 AM |
|
Eagerly awaiting this new weekend-coin, buahaha. So glad to see you are getting support from others in creating this, please keep us updated, I will totally mine for fun when it launches.
Thanks for the interest, I hope we can get this running. A CPU mining only *coin is in the works (or what I hope will be a CPU mining only coin).
|
Currently Mining: Litecoin, Xencoin, and Worldcoin (Just because its fun!, don't yell at me ;_;)
|
|
|
idev
|
|
April 14, 2013, 02:06:00 AM |
|
Maybe this could help shed some light on the situation. https://github.com/sacarlson/MultiCoin/blob/master/create_new_genisis_block.txt
|
|
|
|
wmikrut
|
|
April 14, 2013, 02:10:41 AM |
|
Maybe this could help shed some light on the situation. https://github.com/sacarlson/MultiCoin/blob/master/create_new_genisis_block.txt Saved a sleepless night. We thank you so much!!
|
I will NEVER ask for any kind of funds up front in a buy/sale of anything on bitcointalk.
BM-2cTFihJKmSwusMAoYuUHPvpx56Jozv64KK
|
|
|
pixel (OP)
Member
Offline
Activity: 98
Merit: 10
x1 7970 | Aprox. 587 kh/s
|
|
April 14, 2013, 02:11:26 AM |
|
Maybe this could help shed some light on the situation. https://github.com/sacarlson/MultiCoin/blob/master/create_new_genisis_block.txt Saved a sleepless night. We thank you so much!! Is this confirmed working?
|
Currently Mining: Litecoin, Xencoin, and Worldcoin (Just because its fun!, don't yell at me ;_;)
|
|
|
wmikrut
|
|
April 14, 2013, 02:20:17 AM |
|
I read it and it makes sense... i am away from my dev environment atm. I will try it though... 5th may be able to confirm as well...
|
I will NEVER ask for any kind of funds up front in a buy/sale of anything on bitcointalk.
BM-2cTFihJKmSwusMAoYuUHPvpx56Jozv64KK
|
|
|
pixel (OP)
Member
Offline
Activity: 98
Merit: 10
x1 7970 | Aprox. 587 kh/s
|
|
April 14, 2013, 02:25:20 AM |
|
I read it and it makes sense... i am away from my dev environment atm. I will try it though... 5th may be able to confirm as well...
5th got it working via his/her own method, told us in IRC
|
Currently Mining: Litecoin, Xencoin, and Worldcoin (Just because its fun!, don't yell at me ;_;)
|
|
|
|