This repository has been archived by the owner on Aug 27, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 27
/
genesis.go
453 lines (420 loc) · 16.6 KB
/
genesis.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
// Copyright (c) 2017-2018 The qitmeer developers
// Copyright (c) 2014-2016 The btcsuite developers
// Copyright (c) 2015-2016 The Decred developers
// Use of this source code is governed by an ISC
// license that can be found in the LICENSE file.
package params
import (
"github.com/Qitmeer/qitmeer/common/hash"
"github.com/Qitmeer/qitmeer/core/merkle"
"github.com/Qitmeer/qitmeer/core/protocol"
"github.com/Qitmeer/qitmeer/core/types"
"github.com/Qitmeer/qitmeer/core/types/pow"
"github.com/Qitmeer/qitmeer/ledger"
"time"
)
// MainNet ------------------------------------------------------------------------
var genesisTime = time.Unix(1632913200, 0) // 2021-09-29 19:00:00 GMT+08:00
// genesisCoinbaseTx is the coinbase transaction for the genesis blocks for
// the main network.
func buildGenesisCoinbaseTx(net protocol.Network) types.Transaction {
tx := types.Transaction{
Version: 1,
TxIn: []*types.TxInput{
{
// Fully null.
PreviousOut: types.TxOutPoint{
Hash: hash.Hash{},
OutIndex: 0xffffffff,
},
SignScript: []byte{
0x0f, 0x51, 0x69, 0x74, 0x6d, 0x65, 0x65, 0x72, 0x20, 0x6d, 0x61, 0x69,
0x6e, 0x6e, 0x65, 0x74, 0x41, 0x45, 0x61, 0x74, 0x20, 0x6e, 0x6f, 0x74,
0x20, 0x75, 0x70, 0x20, 0x79, 0x6f, 0x75, 0x72, 0x20, 0x70, 0x72, 0x6f,
0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x61, 0x6d, 0x6f, 0x6e, 0x67, 0x20,
0x79, 0x6f, 0x75, 0x72, 0x73, 0x65, 0x6c, 0x76, 0x65, 0x73, 0x20, 0x69,
0x6e, 0x20, 0x76, 0x61, 0x6e, 0x69, 0x74, 0x79, 0x20, 0x28, 0x51, 0x75,
0x72, 0x61, 0x6e, 0x20, 0x32, 0x3a, 0x31, 0x38, 0x38, 0x29,
},
Sequence: 0xffffffff,
},
},
TxOut: []*types.TxOutput{
{
Amount: types.Amount{Value: 0x00000000, Id: types.MEERID},
PkScript: hexMustDecode("76a9143846e53e5e952b5cd6023e3ad3cfc75cb93fce0388ac"),
},
},
LockTime: 0,
Expire: 0,
Timestamp: genesisTime,
}
return tx
}
// buildGenesisMappingTx is the mapping transaction for the genesis blocks for
// the main network.
func buildGenesisMappingTx(net protocol.Network) types.Transaction {
tx := types.Transaction{
Version: 1,
TxIn: []*types.TxInput{
{
// Fully null.
PreviousOut: types.TxOutPoint{
Hash: hash.Hash{},
OutIndex: 0xfffffffe,
},
SignScript: []byte{
0x0f, 0x51, 0x69, 0x74, 0x6d, 0x65, 0x65, 0x72, 0x20, 0x6d, 0x61, 0x69,
0x6e, 0x6e, 0x65, 0x74, 0x41, 0x45, 0x61, 0x74, 0x20, 0x6e, 0x6f, 0x74,
0x20, 0x75, 0x70, 0x20, 0x79, 0x6f, 0x75, 0x72, 0x20, 0x70, 0x72, 0x6f,
0x70, 0x65, 0x72, 0x74, 0x79, 0x20, 0x61, 0x6d, 0x6f, 0x6e, 0x67, 0x20,
0x79, 0x6f, 0x75, 0x72, 0x73, 0x65, 0x6c, 0x76, 0x65, 0x73, 0x20, 0x69,
0x6e, 0x20, 0x76, 0x61, 0x6e, 0x69, 0x74, 0x79, 0x20, 0x28, 0x51, 0x75,
0x72, 0x61, 0x6e, 0x20, 0x32, 0x3a, 0x31, 0x38, 0x38, 0x29,
},
Sequence: 0xffffffff,
},
},
LockTime: 0,
Expire: 0,
Timestamp: genesisTime,
}
ledger.Ledger(&tx, net)
return tx
}
var genesisCoinbaseTx = buildGenesisCoinbaseTx(protocol.MainNet)
var genesisMappingTx = buildGenesisMappingTx(protocol.MainNet)
var genesisTxs = []*types.Transaction{
&genesisCoinbaseTx,
&genesisMappingTx,
}
// mainnetgenesisMerkleRoot is the hash of the first transaction in the genesis block
// for the main network.
var genesisMerkleRoot = merkle.CalcMerkleRoot(genesisTxs)
// genesisBlock defines the genesis block of the block chain which serves as the
// public transaction ledger for the main network.
//
// The genesis block for mainnet, testnet, and privnet are not evaluated
// for proof of work. The only values that are ever used elsewhere in the
// blockchain from it are:
// (1) The genesis block hash is used as the PrevBlock in params.go.
// (2) The difficulty starts off at the value given by bits.
// (3) The stake difficulty starts off at the value given by SBits.
// (4) The timestamp, which guides when blocks can be built on top of it
// and what the initial difficulty calculations come out to be.
//
// The genesis block is valid by definition and none of the fields within
// it are validated for correctness.
var genesisBlock = types.Block{
Header: types.BlockHeader{
ParentRoot: hash.Hash{},
TxRoot: *genesisMerkleRoot,
//UtxoCommitment: types.Hash{},
//CompactFilter: types.Hash{},
StateRoot: hash.Hash{},
Timestamp: genesisTime,
Difficulty: 0x1b0fffff, // Difficulty 17 T
Pow: pow.GetInstance(pow.MEERXKECCAKV1, 0, []byte{}),
},
Transactions: genesisTxs,
}
// genesisHash is the hash of the first block in the block chain for the main
// network (genesis block).
var genesisHash = genesisBlock.BlockHash()
// TestNet ------------------------------------------------------------------------
// testNetGenesisCoinbaseTx is the coinbase transaction for the genesis blocks for
// the test network.
func buildTestNetGenesisCoinbaseTx(net protocol.Network) types.Transaction {
tx := types.Transaction{
Version: 1,
TxIn: []*types.TxInput{
{
// Fully null.
PreviousOut: types.TxOutPoint{
Hash: hash.Hash{},
OutIndex: 0xffffffff,
},
SignScript: []byte{
0x54, 0x68, 0x65, 0x20, 0x48, 0x4c, 0x43, 0x20, 0x54, 0x6f, 0x6b, 0x65,
0x6e, 0x20, 0x44, 0x65, 0x73, 0x74, 0x72, 0x6f, 0x79, 0x65, 0x64, 0x20,
0x32, 0x30, 0x30, 0x32, 0x38, 0x37, 0x39, 0x31, 0x31, 0x20, 0x37, 0x64,
0x33, 0x38, 0x34, 0x36, 0x61, 0x62, 0x31, 0x36, 0x64, 0x66, 0x61, 0x35,
0x31, 0x31, 0x30, 0x37, 0x39, 0x36, 0x66, 0x36, 0x62, 0x35, 0x66, 0x33,
0x31, 0x33, 0x36, 0x65, 0x64, 0x66, 0x64, 0x63, 0x36, 0x64, 0x39, 0x66,
0x64, 0x64, 0x37, 0x62, 0x33, 0x33, 0x36, 0x62, 0x30, 0x36, 0x37, 0x66,
0x66, 0x38, 0x34, 0x33, 0x35, 0x33, 0x35, 0x36, 0x63, 0x30, 0x38, 0x64,
0x36, 0x61, 0x0a,
0x54, 0x68, 0x65, 0x20, 0x51, 0x69, 0x74, 0x6d, 0x65, 0x65, 0x72, 0x20,
0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x20, 0x54, 0x65, 0x73, 0x74, 0x6e,
0x65, 0x74, 0x20, 0x28, 0x54, 0x68, 0x65, 0x20, 0x4d, 0x65, 0x64, 0x69,
0x6e, 0x61, 0x20, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x20, 0x31,
0x2e, 0x30, 0x29, 0x20, 0x32, 0x30, 0x31, 0x39, 0x2f, 0x31, 0x32, 0x2f,
0x33, 0x30, 0x20, 0x32, 0x30, 0x32, 0x30, 0x2f, 0x30, 0x36, 0x2f, 0x32,
0x30, 0x20, 0x35, 0x34, 0x32, 0x33, 0x37, 0x30, 0x20, 0x36, 0x35, 0x32,
0x34, 0x32, 0x39, 0x33, 0x30, 0x30, 0x34, 0x33, 0x36, 0x36, 0x36, 0x33,
0x34, 0x0a,
0x54, 0x68, 0x65, 0x20, 0x4d, 0x65, 0x64, 0x69, 0x6e, 0x61, 0x20, 0x4e,
0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x20, 0x32, 0x2e, 0x30, 0x20, 0x32,
0x30, 0x32, 0x30, 0x2f, 0x30, 0x36, 0x2f, 0x32, 0x34, 0x0a,
0x54, 0x68, 0x6f, 0x73, 0x65, 0x20, 0x77, 0x68, 0x6f, 0x2c, 0x20, 0x77,
0x68, 0x65, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x79, 0x20, 0x73, 0x70, 0x65,
0x6e, 0x64, 0x2c, 0x20, 0x61, 0x72, 0x65, 0x20, 0x6e, 0x6f, 0x74, 0x20,
0x65, 0x78, 0x74, 0x72, 0x61, 0x76, 0x61, 0x67, 0x61, 0x6e, 0x74, 0x20,
0x61, 0x6e, 0x64, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x6e, 0x69, 0x67, 0x67,
0x61, 0x72, 0x64, 0x6c, 0x79, 0x2c, 0x20, 0x62, 0x75, 0x74, 0x20, 0x68,
0x6f, 0x6c, 0x64, 0x20, 0x61, 0x20, 0x6a, 0x75, 0x73, 0x74, 0x20, 0x28,
0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x29, 0x20, 0x62, 0x65, 0x74,
0x77, 0x65, 0x65, 0x6e, 0x20, 0x74, 0x68, 0x6f, 0x73, 0x65, 0x20, 0x28,
0x65, 0x78, 0x74, 0x72, 0x65, 0x6d, 0x65, 0x73, 0x29, 0x2e, 0x20, 0x28,
0x51, 0x75, 0x72, 0x61, 0x6e, 0x20, 0x32, 0x35, 0x3a, 0x36, 0x37, 0x29,
0x0a,
},
Sequence: 0xffffffff,
},
},
LockTime: 0,
Expire: 0,
Timestamp: time.Unix(1627203600, 0), // 2021/07/25 17:00:00 AM GMT+08:00
}
ledger.Ledger(&tx, net)
return tx
}
//
var testNetGenesisCoinbaseTx = buildTestNetGenesisCoinbaseTx(protocol.TestNet)
// testNetGenesisMerkleRoot is the hash of the first transaction in the genesis block
// for the test network.
var testNetGenesisMerkleRoot = testNetGenesisCoinbaseTx.TxHashFull()
// testNetGenesisBlock defines the genesis block of the block chain which
// serves as the public transaction ledger for the test network (version 3).
var testNetGenesisBlock = types.Block{
Header: types.BlockHeader{
ParentRoot: hash.Hash{},
TxRoot: testNetGenesisMerkleRoot,
Timestamp: testNetGenesisCoinbaseTx.Timestamp, // same with the tx timestamp (added since 0.9)
Difficulty: 0x1f0198f2, // 67108864
Pow: pow.GetInstance(pow.MEERXKECCAKV1, 0, []byte{}),
},
Transactions: []*types.Transaction{&testNetGenesisCoinbaseTx},
}
// testNetGenesisHash is the hash of the first block in the block chain for the
// test network.
var testNetGenesisHash = testNetGenesisBlock.BlockHash()
// PrivNet -------------------------------------------------------------------------
var privNetGenesisCoinbaseTx = types.Transaction{
Version: 1,
TxIn: []*types.TxInput{
{
PreviousOut: types.TxOutPoint{
Hash: hash.Hash{},
OutIndex: 0xffffffff,
},
Sequence: 0xffffffff,
SignScript: []byte{
0x04, 0xff, 0xff, 0x00, 0x1d, 0x01, 0x04, 0x45, /* |.......E| */
0x54, 0x68, 0x65, 0x20, 0x54, 0x69, 0x6d, 0x65, /* |The Time| */
0x73, 0x20, 0x30, 0x33, 0x2f, 0x4a, 0x61, 0x6e, /* |s 03/Jan| */
0x2f, 0x32, 0x30, 0x30, 0x39, 0x20, 0x43, 0x68, /* |/2009 Ch| */
0x61, 0x6e, 0x63, 0x65, 0x6c, 0x6c, 0x6f, 0x72, /* |ancellor| */
0x20, 0x6f, 0x6e, 0x20, 0x62, 0x72, 0x69, 0x6e, /* | on brin| */
0x6b, 0x20, 0x6f, 0x66, 0x20, 0x73, 0x65, 0x63, /* |k of sec|*/
0x6f, 0x6e, 0x64, 0x20, 0x62, 0x61, 0x69, 0x6c, /* |ond bail| */
0x6f, 0x75, 0x74, 0x20, 0x66, 0x6f, 0x72, 0x20, /* |out for |*/
0x62, 0x61, 0x6e, 0x6b, 0x73, /* |banks| */
},
},
},
TxOut: []*types.TxOutput{
{
Amount: types.Amount{Value: 0x00000000, Id: types.MEERID},
PkScript: []byte{
0x41, 0x04, 0x67, 0x8a, 0xfd, 0xb0, 0xfe, 0x55, /* |A.g....U| */
0x48, 0x27, 0x19, 0x67, 0xf1, 0xa6, 0x71, 0x30, /* |H'.g..q0| */
0xb7, 0x10, 0x5c, 0xd6, 0xa8, 0x28, 0xe0, 0x39, /* |..\..(.9| */
0x09, 0xa6, 0x79, 0x62, 0xe0, 0xea, 0x1f, 0x61, /* |..yb...a| */
0xde, 0xb6, 0x49, 0xf6, 0xbc, 0x3f, 0x4c, 0xef, /* |..I..?L.| */
0x38, 0xc4, 0xf3, 0x55, 0x04, 0xe5, 0x1e, 0xc1, /* |8..U....| */
0x12, 0xde, 0x5c, 0x38, 0x4d, 0xf7, 0xba, 0x0b, /* |..\8M...| */
0x8d, 0x57, 0x8a, 0x4c, 0x70, 0x2b, 0x6b, 0xf1, /* |.W.Lp+k.| */
0x1d, 0x5f, 0xac, /* |._.| */
},
},
},
LockTime: 0,
Expire: 0,
}
var privNetGenesisTx1 = buildPrvNetGenesisTxOne()
func buildPrvNetGenesisTxOne() types.Transaction {
tx := types.Transaction{
Version: 1,
TxIn: []*types.TxInput{
{
PreviousOut: types.TxOutPoint{
Hash: hash.Hash{},
OutIndex: 0xffffffff,
},
Sequence: 0xffffffff,
SignScript: []byte{
0x04, 0xff, 0xff, 0x00, 0x1d, 0x01, 0x04, 0x45, /* |.......E| */
0x54, 0x68, 0x65, 0x20, 0x54, 0x69, 0x6d, 0x65, /* |The Time| */
0x73, 0x20, 0x30, 0x33, 0x2f, 0x4a, 0x61, 0x6e, /* |s 03/Jan| */
0x2f, 0x32, 0x30, 0x30, 0x39, 0x20, 0x43, 0x68, /* |/2009 Ch| */
0x61, 0x6e, 0x63, 0x65, 0x6c, 0x6c, 0x6f, 0x72, /* |ancellor| */
0x20, 0x6f, 0x6e, 0x20, 0x62, 0x72, 0x69, 0x6e, /* | on brin| */
0x6b, 0x20, 0x6f, 0x66, 0x20, 0x73, 0x65, 0x63, /* |k of sec|*/
0x6f, 0x6e, 0x64, 0x20, 0x62, 0x61, 0x69, 0x6c, /* |ond bail| */
0x6f, 0x75, 0x74, 0x20, 0x66, 0x6f, 0x72, 0x20, /* |out for |*/
0x62, 0x61, 0x6e, 0x6b, 0x73, /* |banks| */
},
},
{
PreviousOut: types.TxOutPoint{
Hash: hash.Hash{},
OutIndex: 0xffffffff,
},
Sequence: 0xffffffff,
SignScript: []byte{},
},
},
LockTime: 0,
Expire: 0,
}
ledger.Ledger(&tx, protocol.PrivNet)
return tx
}
var privNetGenesisTxs = []*types.Transaction{
&privNetGenesisCoinbaseTx,
&privNetGenesisTx1,
}
// privNetGenesisMerkleRoot is the hash of the first transaction in the genesis
// block for the simulation test network. It is the same as the merkle root for
// the main network.
var privNetGenesisMerkleRoot = merkle.CalcMerkleRoot(privNetGenesisTxs)
var zeroHash = hash.ZeroHash
// privNetGenesisBlock defines the genesis block of the block chain which serves
// as the public transaction ledger for the simulation test network.
var privNetGenesisBlock = types.Block{
Header: types.BlockHeader{
ParentRoot: zeroHash,
TxRoot: *privNetGenesisMerkleRoot,
StateRoot: hash.Hash([32]byte{ // Make go vet happy.
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
}),
Timestamp: time.Unix(1530833717, 0), // 2018-07-05 23:35:17 GMT
Difficulty: 0x207fffff, // 545259519
Pow: pow.GetInstance(pow.BLAKE2BD, 0, []byte{}),
},
Transactions: privNetGenesisTxs,
}
// privNetGenesisHash is the hash of the first block in the block chain for the
// private test network.
var privNetGenesisHash = privNetGenesisBlock.BlockHash()
// TestMixNet ------------------------------------------------------------------------
//
var testPowNetGenesisCoinbaseTx = types.Transaction{
Version: 1,
TxIn: []*types.TxInput{
{
PreviousOut: types.TxOutPoint{
Hash: hash.Hash{},
OutIndex: 0xffffffff,
},
Sequence: 0xffffffff,
SignScript: []byte{
0x04, 0xff, 0xff, 0x00, 0x1d, 0x01, 0x04, 0x45, /* |.......E| */
0x54, 0x68, 0x65, 0x20, 0x54, 0x69, 0x6d, 0x65, /* |The Time| */
0x73, 0x20, 0x30, 0x33, 0x2f, 0x4a, 0x61, 0x6e, /* |s 03/Jan| */
0x2f, 0x32, 0x30, 0x30, 0x39, 0x20, 0x43, 0x68, /* |/2009 Ch| */
0x61, 0x6e, 0x63, 0x65, 0x6c, 0x6c, 0x6f, 0x72, /* |ancellor| */
0x20, 0x6f, 0x6e, 0x20, 0x62, 0x72, 0x69, 0x6e, /* | on brin| */
0x6b, 0x20, 0x6f, 0x66, 0x20, 0x73, 0x65, 0x63, /* |k of sec|*/
0x6f, 0x6e, 0x64, 0x20, 0x62, 0x61, 0x69, 0x6c, /* |ond bail| */
0x6f, 0x75, 0x74, 0x20, 0x66, 0x6f, 0x72, 0x20, /* |out for |*/
0x62, 0x61, 0x6e, 0x6b, 0x73, /* |banks| */
},
},
},
TxOut: []*types.TxOutput{
{
Amount: types.Amount{Value: 0x00000000, Id: types.MEERID},
PkScript: []byte{
0x41, 0x04, 0x67, 0x8a, 0xfd, 0xb0, 0xfe, 0x55, /* |A.g....U| */
0x48, 0x27, 0x19, 0x67, 0xf1, 0xa6, 0x71, 0x30, /* |H'.g..q0| */
0xb7, 0x10, 0x5c, 0xd6, 0xa8, 0x28, 0xe0, 0x39, /* |..\..(.9| */
0x09, 0xa6, 0x79, 0x62, 0xe0, 0xea, 0x1f, 0x61, /* |..yb...a| */
0xde, 0xb6, 0x49, 0xf6, 0xbc, 0x3f, 0x4c, 0xef, /* |..I..?L.| */
0x38, 0xc4, 0xf3, 0x55, 0x04, 0xe5, 0x1e, 0xc1, /* |8..U....| */
0x12, 0xde, 0x5c, 0x38, 0x4d, 0xf7, 0xba, 0x0b, /* |..\8M...| */
0x8d, 0x57, 0x8a, 0x4c, 0x70, 0x2b, 0x6b, 0xf1, /* |.W.Lp+k.| */
0x1d, 0x5f, 0xac, /* |._.| */
},
},
},
LockTime: 0,
Expire: 0,
}
var mixNetGenesisTx1 = buildMixNetGenesisTxOne()
func buildMixNetGenesisTxOne() types.Transaction {
tx := types.Transaction{
Version: 1,
TxIn: []*types.TxInput{
{
PreviousOut: types.TxOutPoint{
Hash: hash.Hash{},
OutIndex: 0xffffffff,
},
Sequence: 0xffffffff,
SignScript: []byte{
0x04, 0xff, 0xff, 0x00, 0x1d, 0x01, 0x04, 0x45, /* |.......E| */
0x54, 0x68, 0x65, 0x20, 0x54, 0x69, 0x6d, 0x65, /* |The Time| */
0x73, 0x20, 0x30, 0x33, 0x2f, 0x4a, 0x61, 0x6e, /* |s 03/Jan| */
0x2f, 0x32, 0x30, 0x30, 0x39, 0x20, 0x43, 0x68, /* |/2009 Ch| */
0x61, 0x6e, 0x63, 0x65, 0x6c, 0x6c, 0x6f, 0x72, /* |ancellor| */
0x20, 0x6f, 0x6e, 0x20, 0x62, 0x72, 0x69, 0x6e, /* | on brin| */
0x6b, 0x20, 0x6f, 0x66, 0x20, 0x73, 0x65, 0x63, /* |k of sec|*/
0x6f, 0x6e, 0x64, 0x20, 0x62, 0x61, 0x69, 0x6c, /* |ond bail| */
0x6f, 0x75, 0x74, 0x20, 0x66, 0x6f, 0x72, 0x20, /* |out for |*/
0x62, 0x61, 0x6e, 0x6b, 0x73, /* |banks| */
},
},
{
PreviousOut: types.TxOutPoint{
Hash: hash.Hash{},
OutIndex: 0xffffffff,
},
Sequence: 0xffffffff,
SignScript: []byte{},
},
},
Timestamp: time.Unix(1632700998, 0), // 2021-09-27 08:03:18
LockTime: 0,
Expire: 0,
}
ledger.Ledger(&tx, protocol.MixNet)
return tx
}
var mixNetGenesisTxs = []*types.Transaction{
&testPowNetGenesisCoinbaseTx,
&mixNetGenesisTx1,
}
// testNetGenesisMerkleRoot is the hash of the first transaction in the genesis block
// for the test network.
var testPowNetGenesisMerkleRoot = merkle.CalcMerkleRoot(mixNetGenesisTxs)
// testNetGenesisBlock defines the genesis block of the block chain which
// serves as the public transaction ledger for the test network (version 3).
var testPowNetGenesisBlock = types.Block{
Header: types.BlockHeader{
ParentRoot: hash.Hash{},
TxRoot: *testPowNetGenesisMerkleRoot,
Timestamp: time.Unix(1632273458, 0), // 2021-09-22 09:17:38
Difficulty: 0x1c00ffff, // 1T diff
Pow: pow.GetInstance(pow.MEERXKECCAKV1, 0, []byte{}),
},
Transactions: mixNetGenesisTxs,
Parents: []*hash.Hash{},
}
// testNetGenesisHash is the hash of the first block in the block chain for the
// test network.
var testPowNetGenesisHash = testPowNetGenesisBlock.BlockHash()