Repository: kaspanet/kaspad
Pull request #1582 (2021-03-08 10:49:11)

Update testnet genesis and testnet network name

codecov[bot]: # [Codecov](https://codecov.io/gh/kaspanet/kaspad/pull/1582?src=pr&el=h1) Report
> Merging [#1582](https://codecov.io/gh/kaspanet/kaspad/pull/1582?src=pr&el=desc) (1a17bc5) into [v0.9.1-dev](https://codecov.io/gh/kaspanet/kaspad/commit/98c2dc818904cc29129e60020667c4be670a7a32?el=desc) (98c2dc8) will **decrease** coverage by `0.01%`.
> The diff coverage is `n/a`.

[![Impacted file tree graph](https://codecov.io/gh/kaspanet/kaspad/pull/1582/graphs/tree.svg?width=650&height=150&src=pr&token=2FBIEEJTNU)](https://codecov.io/gh/kaspanet/kaspad/pull/1582?src=pr&el=tree)

```diff
@@              Coverage Diff               @@
##           v0.9.1-dev    #1582      +/-   ##
==============================================
- Coverage       59.98%   59.96%   -0.02%     
==============================================
  Files             515      515              
  Lines           20320    20320              
==============================================
- Hits            12188    12185       -3     
- Misses           6203     6204       +1     
- Partials         1929     1931       +2     
```


| [Impacted Files](https://codecov.io/gh/kaspanet/kaspad/pull/1582?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [domain/dagconfig/params.go](https://codecov.io/gh/kaspanet/kaspad/pull/1582/diff?src=pr&el=tree#diff-ZG9tYWluL2RhZ2NvbmZpZy9wYXJhbXMuZ28=) | `91.66% <ø> (ø)` | |
| [...k/netadapter/server/grpcserver/connection\_loops.go](https://codecov.io/gh/kaspanet/kaspad/pull/1582/diff?src=pr&el=tree#diff-aW5mcmFzdHJ1Y3R1cmUvbmV0d29yay9uZXRhZGFwdGVyL3NlcnZlci9ncnBjc2VydmVyL2Nvbm5lY3Rpb25fbG9vcHMuZ28=) | `53.84% <0.00%> (-3.85%)` | :arrow_down: |
| [app/protocol/flows/blockrelay/handle\_relay\_invs.go](https://codecov.io/gh/kaspanet/kaspad/pull/1582/diff?src=pr&el=tree#diff-YXBwL3Byb3RvY29sL2Zsb3dzL2Jsb2NrcmVsYXkvaGFuZGxlX3JlbGF5X2ludnMuZ28=) | `68.75% <0.00%> (-1.25%)` | :arrow_down: |
| [...ersselectedchainstore/headersselectedchainstore.go](https://codecov.io/gh/kaspanet/kaspad/pull/1582/diff?src=pr&el=tree#diff-ZG9tYWluL2NvbnNlbnN1cy9kYXRhc3RydWN0dXJlcy9oZWFkZXJzc2VsZWN0ZWRjaGFpbnN0b3JlL2hlYWRlcnNzZWxlY3RlZGNoYWluc3RvcmUuZ28=) | `70.87% <0.00%> (ø)` | |
| [...ain/consensus/database/binaryserialization/hash.go](https://codecov.io/gh/kaspanet/kaspad/pull/1582/diff?src=pr&el=tree#diff-ZG9tYWluL2NvbnNlbnN1cy9kYXRhYmFzZS9iaW5hcnlzZXJpYWxpemF0aW9uL2hhc2guZ28=) | `100.00% <0.00%> (+50.00%)` | :arrow_up: |

------

[Continue to review full report at Codecov](https://codecov.io/gh/kaspanet/kaspad/pull/1582?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/kaspanet/kaspad/pull/1582?src=pr&el=footer). Last update [98c2dc8...890f887](https://codecov.io/gh/kaspanet/kaspad/pull/1582?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).


Patch:
diff --git a/domain/dagconfig/genesis.go b/domain/dagconfig/genesis.go
index d91ad274..db8e6466 100644
--- a/domain/dagconfig/genesis.go
+++ b/domain/dagconfig/genesis.go
@@ -182,10 +182,10 @@ var testnetGenesisCoinbaseTx = transactionhelper.NewSubnetworkTransaction(0,
 // testnetGenesisHash is the hash of the first block in the block DAG for the test
 // network (genesis block).
 var testnetGenesisHash = externalapi.NewDomainHashFromByteArray(&[externalapi.DomainHashSize]byte{
-	0x5d, 0xb7, 0x49, 0xc1, 0x6e, 0xfb, 0x4e, 0x7a,
-	0x0c, 0x9f, 0xd1, 0x80, 0x74, 0x91, 0x60, 0xd0,
-	0x1b, 0x84, 0xc7, 0x92, 0xa8, 0x5f, 0xcf, 0x9b,
-	0x1d, 0x8c, 0x8c, 0x34, 0xa9, 0x41, 0x5f, 0xa5,
+	0x0f, 0x7f, 0x3f, 0x9d, 0x70, 0x8e, 0x58, 0x33,
+	0xac, 0xb6, 0x50, 0xea, 0xcc, 0xb9, 0x74, 0x28,
+	0x79, 0x54, 0xd6, 0xee, 0x00, 0x1c, 0xe8, 0x1c,
+	0xad, 0x16, 0xcb, 0x84, 0xf0, 0xa2, 0x21, 0xd0,
 })
 
 // testnetGenesisMerkleRoot is the hash of the first transaction in the genesis block
@@ -206,9 +206,9 @@ var testnetGenesisBlock = externalapi.DomainBlock{
 		testnetGenesisMerkleRoot,
 		&externalapi.DomainHash{},
 		&externalapi.DomainHash{},
-		0x176eb9ddb6d,
+		0x1777751272b,
 		0x1e7fffff,
-		0x5dba6,
+		0x55c0,
 	),
 	Transactions: []*externalapi.DomainTransaction{testnetGenesisCoinbaseTx},
 }
diff --git a/domain/dagconfig/params.go b/domain/dagconfig/params.go
index e1675b4f..fd3d1731 100644
--- a/domain/dagconfig/params.go
+++ b/domain/dagconfig/params.go
@@ -256,11 +256,11 @@ var MainnetParams = Params{
 // TestnetParams defines the network parameters for the test Kaspa network.
 var TestnetParams = Params{
 	K:           defaultGHOSTDAGK,
-	Name:        "kaspa-testnet-2",
+	Name:        "kaspa-testnet-3",
 	Net:         appmessage.Testnet,
 	RPCPort:     "16210",
 	DefaultPort: "16211",
-	DNSSeeds:    []string{"testnet-2-dnsseed.daglabs-dev.com"},
+	DNSSeeds:    []string{"testnet-3-dnsseed.daglabs-dev.com"},
 
 	// DAG parameters
 	GenesisBlock:                   &testnetGenesisBlock,


Test patch:
diff --git a/domain/consensus/processes/dagtraversalmanager/window_test.go b/domain/consensus/processes/dagtraversalmanager/window_test.go
index 5f4db12c..d4088945 100644
--- a/domain/consensus/processes/dagtraversalmanager/window_test.go
+++ b/domain/consensus/processes/dagtraversalmanager/window_test.go
@@ -130,37 +130,37 @@ func TestBlockWindow(t *testing.T) {
 			{
 				parents:                          []string{"H", "F"},
 				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"},
 				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"},
 				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"},
 				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"},
 				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"},
 				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"},
 				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: {