github.com/mit-dci/lit@v0.0.0-20221102210550-8c3d3b49f2ce/btcutil/chaincfg/genesis.go (about)

     1  // Copyright (c) 2014-2016 The btcsuite developers
     2  // Use of this source code is governed by an ISC
     3  // license that can be found in the LICENSE file.
     4  
     5  package chaincfg
     6  
     7  import (
     8  	"time"
     9  
    10  	"github.com/mit-dci/lit/btcutil/chaincfg/chainhash"
    11  	"github.com/mit-dci/lit/wire"
    12  )
    13  
    14  // genesisCoinbaseTx is the coinbase transaction for the genesis blocks for
    15  // the main network, regression test network, and test network (version 3).
    16  var genesisCoinbaseTx = wire.MsgTx{
    17  	Version: 1,
    18  	TxIn: []*wire.TxIn{
    19  		{
    20  			PreviousOutPoint: wire.OutPoint{
    21  				Hash:  chainhash.Hash{},
    22  				Index: 0xffffffff,
    23  			},
    24  			SignatureScript: []byte{
    25  				0x04, 0xff, 0xff, 0x00, 0x1d, 0x01, 0x04, 0x45, /* |.......E| */
    26  				0x54, 0x68, 0x65, 0x20, 0x54, 0x69, 0x6d, 0x65, /* |The Time| */
    27  				0x73, 0x20, 0x30, 0x33, 0x2f, 0x4a, 0x61, 0x6e, /* |s 03/Jan| */
    28  				0x2f, 0x32, 0x30, 0x30, 0x39, 0x20, 0x43, 0x68, /* |/2009 Ch| */
    29  				0x61, 0x6e, 0x63, 0x65, 0x6c, 0x6c, 0x6f, 0x72, /* |ancellor| */
    30  				0x20, 0x6f, 0x6e, 0x20, 0x62, 0x72, 0x69, 0x6e, /* | on brin| */
    31  				0x6b, 0x20, 0x6f, 0x66, 0x20, 0x73, 0x65, 0x63, /* |k of sec|*/
    32  				0x6f, 0x6e, 0x64, 0x20, 0x62, 0x61, 0x69, 0x6c, /* |ond bail| */
    33  				0x6f, 0x75, 0x74, 0x20, 0x66, 0x6f, 0x72, 0x20, /* |out for |*/
    34  				0x62, 0x61, 0x6e, 0x6b, 0x73, /* |banks| */
    35  			},
    36  			Sequence: 0xffffffff,
    37  		},
    38  	},
    39  	TxOut: []*wire.TxOut{
    40  		{
    41  			Value: 0x12a05f200,
    42  			PkScript: []byte{
    43  				0x41, 0x04, 0x67, 0x8a, 0xfd, 0xb0, 0xfe, 0x55, /* |A.g....U| */
    44  				0x48, 0x27, 0x19, 0x67, 0xf1, 0xa6, 0x71, 0x30, /* |H'.g..q0| */
    45  				0xb7, 0x10, 0x5c, 0xd6, 0xa8, 0x28, 0xe0, 0x39, /* |..\..(.9| */
    46  				0x09, 0xa6, 0x79, 0x62, 0xe0, 0xea, 0x1f, 0x61, /* |..yb...a| */
    47  				0xde, 0xb6, 0x49, 0xf6, 0xbc, 0x3f, 0x4c, 0xef, /* |..I..?L.| */
    48  				0x38, 0xc4, 0xf3, 0x55, 0x04, 0xe5, 0x1e, 0xc1, /* |8..U....| */
    49  				0x12, 0xde, 0x5c, 0x38, 0x4d, 0xf7, 0xba, 0x0b, /* |..\8M...| */
    50  				0x8d, 0x57, 0x8a, 0x4c, 0x70, 0x2b, 0x6b, 0xf1, /* |.W.Lp+k.| */
    51  				0x1d, 0x5f, 0xac, /* |._.| */
    52  			},
    53  		},
    54  	},
    55  	LockTime: 0,
    56  }
    57  
    58  // genesisHash is the hash of the first block in the block chain for the main
    59  // network (genesis block).
    60  var genesisHash = chainhash.Hash([chainhash.HashSize]byte{ // Make go vet happy.
    61  	0x6f, 0xe2, 0x8c, 0x0a, 0xb6, 0xf1, 0xb3, 0x72,
    62  	0xc1, 0xa6, 0xa2, 0x46, 0xae, 0x63, 0xf7, 0x4f,
    63  	0x93, 0x1e, 0x83, 0x65, 0xe1, 0x5a, 0x08, 0x9c,
    64  	0x68, 0xd6, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00,
    65  })
    66  
    67  // genesisMerkleRoot is the hash of the first transaction in the genesis block
    68  // for the main network.
    69  var genesisMerkleRoot = chainhash.Hash([chainhash.HashSize]byte{ // Make go vet happy.
    70  	0x3b, 0xa3, 0xed, 0xfd, 0x7a, 0x7b, 0x12, 0xb2,
    71  	0x7a, 0xc7, 0x2c, 0x3e, 0x67, 0x76, 0x8f, 0x61,
    72  	0x7f, 0xc8, 0x1b, 0xc3, 0x88, 0x8a, 0x51, 0x32,
    73  	0x3a, 0x9f, 0xb8, 0xaa, 0x4b, 0x1e, 0x5e, 0x4a,
    74  })
    75  
    76  // genesisBlock defines the genesis block of the block chain which serves as the
    77  // public transaction ledger for the main network.
    78  var genesisBlock = wire.MsgBlock{
    79  	Header: wire.BlockHeader{
    80  		Version:    1,
    81  		PrevBlock:  chainhash.Hash{},         // 0000000000000000000000000000000000000000000000000000000000000000
    82  		MerkleRoot: genesisMerkleRoot,        // 4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b
    83  		Timestamp:  time.Unix(0x495fab29, 0), // 2009-01-03 18:15:05 +0000 UTC
    84  		Bits:       0x1d00ffff,               // 486604799 [00000000ffff0000000000000000000000000000000000000000000000000000]
    85  		Nonce:      0x7c2bac1d,               // 2083236893
    86  	},
    87  	Transactions: []*wire.MsgTx{&genesisCoinbaseTx},
    88  }
    89  
    90  // regTestGenesisHash is the hash of the first block in the block chain for the
    91  // regression test network (genesis block).
    92  var regTestGenesisHash = chainhash.Hash([chainhash.HashSize]byte{ // Make go vet happy.
    93  	0x06, 0x22, 0x6e, 0x46, 0x11, 0x1a, 0x0b, 0x59,
    94  	0xca, 0xaf, 0x12, 0x60, 0x43, 0xeb, 0x5b, 0xbf,
    95  	0x28, 0xc3, 0x4f, 0x3a, 0x5e, 0x33, 0x2a, 0x1f,
    96  	0xc7, 0xb2, 0xb7, 0x3c, 0xf1, 0x88, 0x91, 0x0f,
    97  })
    98  
    99  // regTestGenesisMerkleRoot is the hash of the first transaction in the genesis
   100  // block for the regression test network.  It is the same as the merkle root for
   101  // the main network.
   102  var regTestGenesisMerkleRoot = genesisMerkleRoot
   103  
   104  // regTestGenesisBlock defines the genesis block of the block chain which serves
   105  // as the public transaction ledger for the regression test network.
   106  var regTestGenesisBlock = wire.MsgBlock{
   107  	Header: wire.BlockHeader{
   108  		Version:    1,
   109  		PrevBlock:  chainhash.Hash{},         // 0000000000000000000000000000000000000000000000000000000000000000
   110  		MerkleRoot: regTestGenesisMerkleRoot, // 4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b
   111  		Timestamp:  time.Unix(1296688602, 0), // 2011-02-02 23:16:42 +0000 UTC
   112  		Bits:       0x207fffff,               // 545259519 [7fffff0000000000000000000000000000000000000000000000000000000000]
   113  		Nonce:      2,
   114  	},
   115  	Transactions: []*wire.MsgTx{&genesisCoinbaseTx},
   116  }
   117  
   118  // testNet3GenesisHash is the hash of the first block in the block chain for the
   119  // test network (version 3).
   120  var testNet3GenesisHash = chainhash.Hash([chainhash.HashSize]byte{ // Make go vet happy.
   121  	0x43, 0x49, 0x7f, 0xd7, 0xf8, 0x26, 0x95, 0x71,
   122  	0x08, 0xf4, 0xa3, 0x0f, 0xd9, 0xce, 0xc3, 0xae,
   123  	0xba, 0x79, 0x97, 0x20, 0x84, 0xe9, 0x0e, 0xad,
   124  	0x01, 0xea, 0x33, 0x09, 0x00, 0x00, 0x00, 0x00,
   125  })
   126  
   127  // testNet3GenesisMerkleRoot is the hash of the first transaction in the genesis
   128  // block for the test network (version 3).  It is the same as the merkle root
   129  // for the main network.
   130  var testNet3GenesisMerkleRoot = genesisMerkleRoot
   131  
   132  // testNet3GenesisBlock defines the genesis block of the block chain which
   133  // serves as the public transaction ledger for the test network (version 3).
   134  var testNet3GenesisBlock = wire.MsgBlock{
   135  	Header: wire.BlockHeader{
   136  		Version:    1,
   137  		PrevBlock:  chainhash.Hash{},          // 0000000000000000000000000000000000000000000000000000000000000000
   138  		MerkleRoot: testNet3GenesisMerkleRoot, // 4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b
   139  		Timestamp:  time.Unix(1296688602, 0),  // 2011-02-02 23:16:42 +0000 UTC
   140  		Bits:       0x1d00ffff,                // 486604799 [00000000ffff0000000000000000000000000000000000000000000000000000]
   141  		Nonce:      0x18aea41a,                // 414098458
   142  	},
   143  	Transactions: []*wire.MsgTx{&genesisCoinbaseTx},
   144  }
   145  
   146  // ==================== LiteCoinTestNet4
   147  
   148  // liteCoinTestNet4GenesisHash is the first hash in litecoin testnet4
   149  var liteCoinTestNet4GenesisHash = chainhash.Hash([chainhash.HashSize]byte{ // Make go vet happy.
   150  	0xa0, 0x29, 0x3e, 0x4e, 0xeb, 0x3d, 0xa6, 0xe6, 0xf5, 0x6f, 0x81, 0xed,
   151  	0x59, 0x5f, 0x57, 0x88, 0x0d, 0x1a, 0x21, 0x56, 0x9e, 0x13, 0xee, 0xfd,
   152  	0xd9, 0x51, 0x28, 0x4b, 0x5a, 0x62, 0x66, 0x49,
   153  })
   154  
   155  var liteCoinTestNet4MerkleRoot = chainhash.Hash([chainhash.HashSize]byte{ // Make go vet happy.
   156  	0xd9, 0xce, 0xd4, 0xed, 0x11, 0x30, 0xf7, 0xb7, 0xfa, 0xad, 0x9b, 0xe2,
   157  	0x53, 0x23, 0xff, 0xaf, 0xa3, 0x32, 0x32, 0xa1, 0x7c, 0x3e, 0xdf, 0x6c,
   158  	0xfd, 0x97, 0xbe, 0xe6, 0xba, 0xfb, 0xdd, 0x97,
   159  })
   160  
   161  // liteCoinTestNet4GenesisBlock has is like completely its own thing
   162  var liteCoinTestNet4GenesisBlock = wire.MsgBlock{
   163  	Header: wire.BlockHeader{
   164  		Version:    1,
   165  		PrevBlock:  chainhash.Hash{}, // empty
   166  		MerkleRoot: liteCoinTestNet4MerkleRoot,
   167  		Timestamp:  time.Unix(1486949366, 0), // later
   168  		Bits:       0x1e0ffff0,
   169  		Nonce:      293345,
   170  	},
   171  	//	Transactions: []*wire.MsgTx{&genesisCoinbaseTx}, // this is wrong... will it break?
   172  }
   173  
   174  // ==================== LiteRegNet
   175  
   176  // liteCoinRegTestGenesisHash is the first hash in litecoin regtest
   177  var liteCoinRegTestGenesisHash = chainhash.Hash([chainhash.HashSize]byte{ // Make go vet happy.
   178  	0xf9, 0x16, 0xc4, 0x56, 0xfc, 0x51, 0xdf, 0x62,
   179  	0x78, 0x85, 0xd7, 0xd6, 0x74, 0xed, 0x02, 0xdc,
   180  	0x88, 0xa2, 0x25, 0xad, 0xb3, 0xf0, 0x2a, 0xd1,
   181  	0x3e, 0xb4, 0x93, 0x8f, 0xf3, 0x27, 0x08, 0x53,
   182  })
   183  
   184  // is this the same...?
   185  var liteCoinRegTestMerkleRoot = chainhash.Hash([chainhash.HashSize]byte{ // Make go vet happy.
   186  	0xd9, 0xce, 0xd4, 0xed, 0x11, 0x30, 0xf7, 0xb7, 0xfa, 0xad, 0x9b, 0xe2,
   187  	0x53, 0x23, 0xff, 0xaf, 0xa3, 0x32, 0x32, 0xa1, 0x7c, 0x3e, 0xdf, 0x6c,
   188  	0xfd, 0x97, 0xbe, 0xe6, 0xba, 0xfb, 0xdd, 0x97,
   189  })
   190  
   191  // liteCoinTestNet4GenesisBlock has is like completely its own thing
   192  var liteCoinRegTestGenesisBlock = wire.MsgBlock{
   193  	Header: wire.BlockHeader{
   194  		Version:    1,
   195  		PrevBlock:  chainhash.Hash{}, // empty
   196  		MerkleRoot: liteCoinRegTestMerkleRoot,
   197  		Timestamp:  time.Unix(1296688602, 0), // later
   198  		Bits:       0x207fffff,
   199  		Nonce:      0,
   200  	},
   201  	//	Transactions: []*wire.MsgTx{&genesisCoinbaseTx}, // this is wrong... will it break?
   202  }
   203  
   204  // ================================= BC2
   205  
   206  // bc2GenesisHash is the hash of the first block in the block chain for the
   207  // test network (version 3).
   208  var bc2GenesisHash = chainhash.Hash([chainhash.HashSize]byte{ // Make go vet happy.
   209  	0x71, 0xed, 0xa3, 0xc2, 0xe3, 0x36, 0x73, 0x3d, 0x45, 0x03, 0x88, 0x90,
   210  	0xd8, 0xae, 0x54, 0x11, 0x87, 0x92, 0x1c, 0x49, 0xb8, 0x7f, 0x41, 0xd6,
   211  	0x99, 0xf6, 0xf3, 0xae, 0x0a, 0x00, 0x00, 0x00,
   212  })
   213  
   214  // bc2GenesisMerkleRoot is the same on bc2
   215  var bc2GenesisMerkleRoot = genesisMerkleRoot
   216  
   217  // bc2GenesisBlock has a different time stamp and difficulty
   218  var bc2GenesisBlock = wire.MsgBlock{
   219  	Header: wire.BlockHeader{
   220  		Version:    1,
   221  		PrevBlock:  chainhash.Hash{},         // 0000000000000000000000000000000000000000000000000000000000000000
   222  		MerkleRoot: bc2GenesisMerkleRoot,     // 4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b
   223  		Timestamp:  time.Unix(1483467305, 0), // later
   224  		Bits:       0x1d7fffff,               // 486604799 [00000000ffff0000000000000000000000000000000000000000000000000000]
   225  		Nonce:      0x334188d,                // 53745805
   226  	},
   227  	Transactions: []*wire.MsgTx{&genesisCoinbaseTx},
   228  }
   229  
   230  // simNetGenesisHash is the hash of the first block in the block chain for the
   231  // simulation test network.
   232  var simNetGenesisHash = chainhash.Hash([chainhash.HashSize]byte{ // Make go vet happy.
   233  	0xf6, 0x7a, 0xd7, 0x69, 0x5d, 0x9b, 0x66, 0x2a,
   234  	0x72, 0xff, 0x3d, 0x8e, 0xdb, 0xbb, 0x2d, 0xe0,
   235  	0xbf, 0xa6, 0x7b, 0x13, 0x97, 0x4b, 0xb9, 0x91,
   236  	0x0d, 0x11, 0x6d, 0x5c, 0xbd, 0x86, 0x3e, 0x68,
   237  })
   238  
   239  // simNetGenesisMerkleRoot is the hash of the first transaction in the genesis
   240  // block for the simulation test network.  It is the same as the merkle root for
   241  // the main network.
   242  var simNetGenesisMerkleRoot = genesisMerkleRoot
   243  
   244  // simNetGenesisBlock defines the genesis block of the block chain which serves
   245  // as the public transaction ledger for the simulation test network.
   246  var simNetGenesisBlock = wire.MsgBlock{
   247  	Header: wire.BlockHeader{
   248  		Version:    1,
   249  		PrevBlock:  chainhash.Hash{},         // 0000000000000000000000000000000000000000000000000000000000000000
   250  		MerkleRoot: simNetGenesisMerkleRoot,  // 4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b
   251  		Timestamp:  time.Unix(1401292357, 0), // 2014-05-28 15:52:37 +0000 UTC
   252  		Bits:       0x207fffff,               // 545259519 [7fffff0000000000000000000000000000000000000000000000000000000000]
   253  		Nonce:      2,
   254  	},
   255  	Transactions: []*wire.MsgTx{&genesisCoinbaseTx},
   256  }