Update testnet genesis and testnet network name (#1582)

* Update testnet gensis and testnet network name

* Move genesis closer to the present
This commit is contained in:
Svarog 2021-03-08 15:04:18 +02:00 committed by GitHub
parent 98c2dc8189
commit 921ca19b42
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 15 additions and 15 deletions

View File

@ -130,37 +130,37 @@ func TestBlockWindow(t *testing.T) {
{ {
parents: []string{"H", "F"}, parents: []string{"H", "F"},
id: "I", id: "I",
expectedWindowWithGenesisPadding: []string{"F", "H", "C", "D", "B", "G", "A", "A", "A", "A"}, expectedWindowWithGenesisPadding: []string{"F", "C", "H", "D", "G", "B", "A", "A", "A", "A"},
}, },
{ {
parents: []string{"I"}, parents: []string{"I"},
id: "J", id: "J",
expectedWindowWithGenesisPadding: []string{"I", "F", "H", "C", "D", "B", "G", "A", "A", "A"}, expectedWindowWithGenesisPadding: []string{"I", "F", "C", "H", "D", "G", "B", "A", "A", "A"},
}, },
{ {
parents: []string{"J"}, parents: []string{"J"},
id: "K", id: "K",
expectedWindowWithGenesisPadding: []string{"J", "I", "F", "H", "C", "D", "B", "G", "A", "A"}, expectedWindowWithGenesisPadding: []string{"J", "I", "F", "C", "H", "D", "G", "B", "A", "A"},
}, },
{ {
parents: []string{"K"}, parents: []string{"K"},
id: "L", id: "L",
expectedWindowWithGenesisPadding: []string{"K", "J", "I", "F", "H", "C", "D", "B", "G", "A"}, expectedWindowWithGenesisPadding: []string{"K", "J", "I", "F", "C", "H", "D", "G", "B", "A"},
}, },
{ {
parents: []string{"L"}, parents: []string{"L"},
id: "M", id: "M",
expectedWindowWithGenesisPadding: []string{"L", "K", "J", "I", "F", "H", "C", "D", "B", "G"}, expectedWindowWithGenesisPadding: []string{"L", "K", "J", "I", "F", "C", "H", "D", "G", "B"},
}, },
{ {
parents: []string{"M"}, parents: []string{"M"},
id: "N", id: "N",
expectedWindowWithGenesisPadding: []string{"M", "L", "K", "J", "I", "F", "H", "C", "D", "B"}, expectedWindowWithGenesisPadding: []string{"M", "L", "K", "J", "I", "F", "C", "H", "D", "G"},
}, },
{ {
parents: []string{"N"}, parents: []string{"N"},
id: "O", id: "O",
expectedWindowWithGenesisPadding: []string{"N", "M", "L", "K", "J", "I", "F", "H", "C", "D"}, expectedWindowWithGenesisPadding: []string{"N", "M", "L", "K", "J", "I", "F", "C", "H", "D"},
}, },
}, },
dagconfig.DevnetParams.Name: { dagconfig.DevnetParams.Name: {

View File

@ -182,10 +182,10 @@ var testnetGenesisCoinbaseTx = transactionhelper.NewSubnetworkTransaction(0,
// testnetGenesisHash is the hash of the first block in the block DAG for the test // testnetGenesisHash is the hash of the first block in the block DAG for the test
// network (genesis block). // network (genesis block).
var testnetGenesisHash = externalapi.NewDomainHashFromByteArray(&[externalapi.DomainHashSize]byte{ var testnetGenesisHash = externalapi.NewDomainHashFromByteArray(&[externalapi.DomainHashSize]byte{
0x5d, 0xb7, 0x49, 0xc1, 0x6e, 0xfb, 0x4e, 0x7a, 0x0f, 0x7f, 0x3f, 0x9d, 0x70, 0x8e, 0x58, 0x33,
0x0c, 0x9f, 0xd1, 0x80, 0x74, 0x91, 0x60, 0xd0, 0xac, 0xb6, 0x50, 0xea, 0xcc, 0xb9, 0x74, 0x28,
0x1b, 0x84, 0xc7, 0x92, 0xa8, 0x5f, 0xcf, 0x9b, 0x79, 0x54, 0xd6, 0xee, 0x00, 0x1c, 0xe8, 0x1c,
0x1d, 0x8c, 0x8c, 0x34, 0xa9, 0x41, 0x5f, 0xa5, 0xad, 0x16, 0xcb, 0x84, 0xf0, 0xa2, 0x21, 0xd0,
}) })
// testnetGenesisMerkleRoot is the hash of the first transaction in the genesis block // testnetGenesisMerkleRoot is the hash of the first transaction in the genesis block
@ -206,9 +206,9 @@ var testnetGenesisBlock = externalapi.DomainBlock{
testnetGenesisMerkleRoot, testnetGenesisMerkleRoot,
&externalapi.DomainHash{}, &externalapi.DomainHash{},
&externalapi.DomainHash{}, &externalapi.DomainHash{},
0x176eb9ddb6d, 0x1777751272b,
0x1e7fffff, 0x1e7fffff,
0x5dba6, 0x55c0,
), ),
Transactions: []*externalapi.DomainTransaction{testnetGenesisCoinbaseTx}, Transactions: []*externalapi.DomainTransaction{testnetGenesisCoinbaseTx},
} }

View File

@ -256,11 +256,11 @@ var MainnetParams = Params{
// TestnetParams defines the network parameters for the test Kaspa network. // TestnetParams defines the network parameters for the test Kaspa network.
var TestnetParams = Params{ var TestnetParams = Params{
K: defaultGHOSTDAGK, K: defaultGHOSTDAGK,
Name: "kaspa-testnet-2", Name: "kaspa-testnet-3",
Net: appmessage.Testnet, Net: appmessage.Testnet,
RPCPort: "16210", RPCPort: "16210",
DefaultPort: "16211", DefaultPort: "16211",
DNSSeeds: []string{"testnet-2-dnsseed.daglabs-dev.com"}, DNSSeeds: []string{"testnet-3-dnsseed.daglabs-dev.com"},
// DAG parameters // DAG parameters
GenesisBlock: &testnetGenesisBlock, GenesisBlock: &testnetGenesisBlock,