Bitcoin Forum
December 08, 2016, 12:30:24 AM *
News: To be able to use the next phase of the beta forum software, please ensure that your email address is correct/functional.
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: Genesis block raw dump?  (Read 5157 times)
ThePiachu
Sr. Member
****
Offline Offline

Activity: 442



View Profile WWW
November 23, 2011, 07:39:11 PM
 #1

I`m implementing some low-level Bitcoin operations currently, and I want to recreate the genesis block so I can communicate with the network. As I'm writing the implementation from scratch, and there are no raw dumps of the genesis block (getting to low level byte dumps), can someone check if what my code is generating is a proper dump of the genesis block?

01000000 - version
0000000000000000000000000000000000000000000000000000000000000000 - prev block
4A5E1E4BAAB89F3A32518A88C31BC87F618F76673E2CC77AB2127B7AFDEDA33B - merkle root
29AB5F49 - timestamp
FFFF001D - bits
1DAC2B7C - nonce
01000000 - version
01 - number of transaction
01 - inputs
0000000000000000000000000000000000000000000000000000000000000000FFFFFFFF - prev output
4D - script length
04FFFF001D0104455468652054696D65732030332F4A616E2F32303039204368616E63656C6C6F7 2206F6E206272696E6B206F66207365636F6E64206261696C6F757420666F722062616E6B73 - scriptsig
FFFFFFFF - sequence
01 - outputs
00F2052A01000000 - 50 BTC
42 - pk_script length
04678AFDB0FE5548271967F1A67130B7105CD6A828E03909A67962E0EA1F61DEB649F6BC3F4CEF3 8C4F35504E51EC112DE5C384DF7BA0B8D578A4C702B6BF11D5F - pk_script
AC - OP_Checksig
00000000 - lock time

1HWbVLhxj7bhewhyapMZpyhqWAeAhJd51E
My Bitcoin Calculator:
http://tpbitcalc.appspot.com/
1481157024
Hero Member
*
Offline Offline

Posts: 1481157024

View Profile Personal Message (Offline)

Ignore
1481157024
Reply with quote  #2

1481157024
Report to moderator
1481157024
Hero Member
*
Offline Offline

Posts: 1481157024

View Profile Personal Message (Offline)

Ignore
1481157024
Reply with quote  #2

1481157024
Report to moderator
1481157024
Hero Member
*
Offline Offline

Posts: 1481157024

View Profile Personal Message (Offline)

Ignore
1481157024
Reply with quote  #2

1481157024
Report to moderator
"The nature of Bitcoin is such that once version 0.1 was released, the core design was set in stone for the rest of its lifetime." -- Satoshi
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
theymos
Administrator
Legendary
*
expert
Offline Offline

Activity: 2492


View Profile
November 23, 2011, 07:55:08 PM
 #2

Some of your data has the wrong endianness. Definitely the Merkle root, and maybe the difficulty and other things.

1NXYoJ5xU91Jp83XfVMHwwTUyZFK64BoAD
ThePiachu
Sr. Member
****
Offline Offline

Activity: 442



View Profile WWW
November 25, 2011, 08:05:45 PM
 #3

Okay, fixed the merkle root, as for the bits I'm not really sure whether the Block Explorer reverses that field, or leaves it as is, so I guess I should ask on the SE.


01000000 - version
0000000000000000000000000000000000000000000000000000000000000000 - prev block
3BA3EDFD7A7B12B27AC72C3E67768F617FC81BC3888A51323A9FB8AA4B1E5E4A - merkle root
29AB5F49 - timestamp
FFFF001D - bits
1DAC2B7C - nonce
01000000 - version
01 - number of transaction
01 - inputs
0000000000000000000000000000000000000000000000000000000000000000FFFFFFFF - prev output
4D - script length
04FFFF001D0104455468652054696D65732030332F4A616E2F32303039204368616E63656C6C6F7 2206F6E206272696E6B206F66207365636F6E64206261696C6F757420666F722062616E6B73 - scriptsig
FFFFFFFF - sequence
01 - outputs
00F2052A01000000 - 50 BTC
42 - pk_script length
04678AFDB0FE5548271967F1A67130B7105CD6A828E03909A67962E0EA1F61DEB649F6BC3F4CEF3 8C4F35504E51EC112DE5C384DF7BA0B8D578A4C702B6BF11D5F - pk_script
AC - OP_Checksig
00000000 - lock time

1HWbVLhxj7bhewhyapMZpyhqWAeAhJd51E
My Bitcoin Calculator:
http://tpbitcalc.appspot.com/
theymos
Administrator
Legendary
*
expert
Offline Offline

Activity: 2492


View Profile
November 25, 2011, 11:29:57 PM
 #4

I think this is the accurate hex:
Code:
01000000
0000000000000000000000000000000000000000000000000000000000000000
3ba3edfd7a7b12b27ac72c3e67768f617fc81bc3888a51323a9fb8aa4b1e5e4a
29ab5f49
ffff001d
1dac2b7c
01
01000000
01
0000000000000000000000000000000000000000000000000000000000000000
ffffffff
4d
04ffff001d0104455468652054696d65732030332f4a616e2f32303039204368616e63656c6c6f72206f6e206272696e6b206f66207365636f6e64206261696c6f757420666f722062616e6b73
ffffffff
01
00f2052a01000000
43
4104678afdb0fe5548271967f1a67130b7105cd6a828e03909a67962e0ea1f61deb649f6bc3f4cef38c4f35504e51ec112de5c384df7ba0b8d578a4c702b6bf11d5fac
00000000

1NXYoJ5xU91Jp83XfVMHwwTUyZFK64BoAD
ThePiachu
Sr. Member
****
Offline Offline

Activity: 442



View Profile WWW
November 28, 2011, 10:15:47 PM
 #5

Hmm, so the main difference (asides two lines being switched between themselves) is between my lines:

42 - pk_script length
04678AFDB0FE5548271967F1A67130B7105CD6A828E03909A67962E0EA1F61DEB649F6BC3F4CEF3 8C4F35504E51EC112DE5C384DF7BA0B8D578A4C702B6BF11D5F - pk_script
AC - OP_Checksig

And your lines:

43
4104678afdb0fe5548271967f1a67130b7105cd6a828e03909a67962e0ea1f61deb649f6bc3f4ce f38c4f35504e51ec112de5c384df7ba0b8d578a4c702b6bf11d5fac

Which is just the inclusion of "41" at the begining of pkscript. Here
http://blockexplorer.com/rawblock/000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f
we can see the line

"scriptPubKey":"04678afdb0fe5548271967f1a67130b7105cd6a828e03909a67962e0ea1f61deb649f6bc3f4cef3 8c4f35504e51ec112de5c384df7ba0b8d578a4c702b6bf11d5f OP_CHECKSIG"

So where does the "41" come from?

1HWbVLhxj7bhewhyapMZpyhqWAeAhJd51E
My Bitcoin Calculator:
http://tpbitcalc.appspot.com/
theymos
Administrator
Legendary
*
expert
Offline Offline

Activity: 2492


View Profile
November 29, 2011, 12:16:20 AM
 #6

It's a script op that pushes 0x41 bytes onto the stack.

1NXYoJ5xU91Jp83XfVMHwwTUyZFK64BoAD
ThePiachu
Sr. Member
****
Offline Offline

Activity: 442



View Profile WWW
November 29, 2011, 02:10:35 PM
 #7

Hmm, isn't that redundant with the pk_script length right before it? Also, I can't find a reference to that script op in the specification of tx https://en.bitcoin.it/wiki/Protocol_specification#tx .

1HWbVLhxj7bhewhyapMZpyhqWAeAhJd51E
My Bitcoin Calculator:
http://tpbitcalc.appspot.com/
Gavin Andresen
Legendary
*
qt
Offline Offline

Activity: 1652


Chief Scientist


View Profile WWW
November 29, 2011, 04:18:57 PM
 #8

Hmm, isn't that redundant with the pk_script length right before it?
No.
Quote
Also, I can't find a reference to that script op in the specification of tx https://en.bitcoin.it/wiki/Protocol_specification#tx .
See: https://en.bitcoin.it/wiki/Script
Opcodes 1-75 push data onto the stack.

How often do you get the chance to work on a potentially world-changing project?
ThePiachu
Sr. Member
****
Offline Offline

Activity: 442



View Profile WWW
November 29, 2011, 09:36:30 PM
 #9

That is interesting, didn't expect that from the Tx example. Thanks for the help!

1HWbVLhxj7bhewhyapMZpyhqWAeAhJd51E
My Bitcoin Calculator:
http://tpbitcalc.appspot.com/
MykelSilver
Full Member
***
Offline Offline

Activity: 226


View Profile
May 23, 2013, 10:13:50 AM
 #10

When I put this passphase (The Times 03/Jan/2009 Chancellor on brink of second bailout for banks) into the brainwallet from https://www.bitaddress.org/ I got a valid bitaddress: 1Nbm3JoDpwS4HRw9WmHaKGAzaeSKXoQ6Ej

Coincidence?

Anyone?

Source: https://en.bitcoin.it/wiki/Genesis_block
ThePiachu
Sr. Member
****
Offline Offline

Activity: 442



View Profile WWW
May 23, 2013, 10:15:36 AM
 #11

When I put this passphase (The Times 03/Jan/2009 Chancellor on brink of second bailout for banks) into the brainwallet from bittaddress.org I got a valid bitaddress: 1Nbm3JoDpwS4HRw9WmHaKGAzaeSKXoQ6Ej

Coincidence?

Anyone?

Source: https://en.bitcoin.it/wiki/Genesis_block

One can make a brainwallet out of any string, and some Bitcoin people like to use "lucky charms" in form of phrases like that.

1HWbVLhxj7bhewhyapMZpyhqWAeAhJd51E
My Bitcoin Calculator:
http://tpbitcalc.appspot.com/
Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!