Skip to content

Commit dfbaa41

Browse files
authored
Update TTN genesis block with proper POW Limits (#23)
1 parent dcdb6fe commit dfbaa41

File tree

3 files changed

+17
-17
lines changed

3 files changed

+17
-17
lines changed

genesis.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -147,19 +147,19 @@ var teraTestNetGenesisBlock = wire.MsgBlock{
147147
PrevBlock: chainhash.Hash{}, // 0000000000000000000000000000000000000000000000000000000000000000
148148
MerkleRoot: testNetGenesisMerkleRoot, // 4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b
149149
Timestamp: time.Unix(1755606836, 0), // 2025-08-19T08:33:56 +0000 UTC
150-
Bits: 0x207fffff, // Easy difficulty for test network
151-
Nonce: 0x00000005, // Nonce value that produces a block hash meeting the proof-of-work requirement for 0x207fffff difficulty
150+
Bits: 0x1d00ffff,
151+
Nonce: 0x411f6c9c, // Nonce value that produces a block hash meeting the proof-of-work requirement for 0x1d00ffff difficulty
152152
},
153153
Transactions: []*wire.MsgTx{&genesisCoinbaseTx},
154154
}
155155

156156
// teraTestNetGenesisHash is the hash of the first block in the blockchain for the
157157
// tera test network.
158158
var teraTestNetGenesisHash = chainhash.Hash([chainhash.HashSize]byte{ // Make go vet happy.
159-
0xb3, 0x63, 0x94, 0x9e, 0x6a, 0x54, 0xc6, 0x83,
160-
0x97, 0x02, 0x56, 0x65, 0x30, 0x53, 0x01, 0x56,
161-
0x28, 0xac, 0x62, 0xc3, 0x8d, 0xdc, 0x3b, 0xe0,
162-
0x3d, 0x3d, 0x49, 0xbf, 0xe6, 0xbf, 0x38, 0x42,
159+
0x6d, 0x77, 0xb7, 0x76, 0x79, 0x81, 0xea, 0xc2,
160+
0xb2, 0x04, 0x4a, 0x1a, 0x1c, 0x19, 0xb9, 0x74,
161+
0x1c, 0x23, 0x47, 0x37, 0x5b, 0x8f, 0xa8, 0xa0,
162+
0xbb, 0xea, 0x99, 0x04, 0x00, 0x00, 0x00, 0x00,
163163
})
164164

165165
// stnGenesisHash is the hash of the first block in the blockchain for the

genesis_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ var teraTestNetGenesisBlockBytes = []byte{
318318
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* |................| */
319319
0x00, 0x00, 0x00, 0x00, 0x3b, 0xa3, 0xed, 0xfd, 0x7a, 0x7b, 0x12, 0xb2, 0x7a, 0xc7, 0x2c, 0x3e, /* |....;...z{..z.,>| */
320320
0x67, 0x76, 0x8f, 0x61, 0x7f, 0xc8, 0x1b, 0xc3, 0x88, 0x8a, 0x51, 0x32, 0x3a, 0x9f, 0xb8, 0xaa, /* |gv.a......Q2:...| */
321-
0x4b, 0x1e, 0x5e, 0x4a, 0x34, 0x6f, 0xa4, 0x68, 0xff, 0xff, 0x7f, 0x20, 0x05, 0x00, 0x00, 0x00, /* |K.^J4o.h... ....| */
321+
0x4b, 0x1e, 0x5e, 0x4a, 0x34, 0x6f, 0xa4, 0x68, 0xff, 0xff, 0x00, 0x1d, 0x9c, 0x6c, 0x1f, 0x41, /* |K.^J4o.h.....l.A| */
322322
0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* |................| */
323323
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* |................| */
324324
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x4d, 0x04, 0xff, 0xff, 0x00, 0x1d, /* |..........M.....| */
@@ -331,7 +331,7 @@ var teraTestNetGenesisBlockBytes = []byte{
331331
0x19, 0x67, 0xf1, 0xa6, 0x71, 0x30, 0xb7, 0x10, 0x5c, 0xd6, 0xa8, 0x28, 0xe0, 0x39, 0x09, 0xa6, /* |.g..q0..\..(.9..| */
332332
0x79, 0x62, 0xe0, 0xea, 0x1f, 0x61, 0xde, 0xb6, 0x49, 0xf6, 0xbc, 0x3f, 0x4c, 0xef, 0x38, 0xc4, /* |yb...a..I..?L.8.| */
333333
0xf3, 0x55, 0x04, 0xe5, 0x1e, 0xc1, 0x12, 0xde, 0x5c, 0x38, 0x4d, 0xf7, 0xba, 0x0b, 0x8d, 0x57, /* |.U......\8M....W| */
334-
0x8a, 0x4c, 0x70, 0x2b, 0x6b, 0xf1, 0x1d, 0x5f, 0xac, 0x00, 0x00, 0x00, 0x00, /* |.Lp+k.._..... | */
334+
0x8a, 0x4c, 0x70, 0x2b, 0x6b, 0xf1, 0x1d, 0x5f, 0xac, 0x00, 0x00, 0x00, 0x00, /* |.Lp+k.._.....| */
335335
}
336336

337337
// TestTeraTestNetGenesisProofOfWork tests that the tera test network genesis
@@ -363,7 +363,7 @@ func TestTeraTestNetGenesisProofOfWork(t *testing.T) {
363363
}
364364

365365
// Verify the nonce is the expected value
366-
expectedNonce := uint32(0x00000005)
366+
expectedNonce := uint32(0x411f6c9c)
367367
if genesisBlock.Header.Nonce != expectedNonce {
368368
t.Fatalf("TestTeraTestNetGenesisProofOfWork: Unexpected nonce - got %d, want %d",
369369
genesisBlock.Header.Nonce, expectedNonce)

params.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -631,11 +631,11 @@ var TeraTestNetParams = Params{
631631
GenesisBlock: &teraTestNetGenesisBlock,
632632
GenesisHash: &teraTestNetGenesisHash,
633633
PowLimit: testNetPowLimit,
634-
PowLimitBits: 0x207fffff, // very easy pow limit
634+
PowLimitBits: 0x1d00ffff,
635635

636-
BIP0034Height: 100000000, // Not active - Permit ver 1 blocks
637-
BIP0065Height: 1351, // Used by regression tests
638-
BIP0066Height: 1251, // Used by regression tests
636+
BIP0034Height: 0,
637+
BIP0065Height: 0,
638+
BIP0066Height: 0,
639639
CSVHeight: 0,
640640

641641
UahfForkHeight: 0, // always enabled
@@ -704,11 +704,11 @@ var TeraScalingTestNetParams = Params{
704704
GenesisBlock: &testNetGenesisBlock,
705705
GenesisHash: &testNetGenesisHash,
706706
PowLimit: testNetPowLimit,
707-
PowLimitBits: 0x207fffff, // very easy pow limit
707+
PowLimitBits: 0x1d00ffff, // very easy pow limit
708708

709-
BIP0034Height: 100000000, // Not active - Permit ver 1 blocks
710-
BIP0065Height: 1351, // Used by regression tests
711-
BIP0066Height: 1251, // Used by regression tests
709+
BIP0034Height: 0, // Not active - Permit ver 1 blocks
710+
BIP0065Height: 0, // Used by regression tests
711+
BIP0066Height: 0, // Used by regression tests
712712
CSVHeight: 0,
713713

714714
UahfForkHeight: 0, // always enabled

0 commit comments

Comments
 (0)