Increase devnet's initial difficulty

This commit is contained in:
Ori Newman 2022-11-13 12:55:59 +02:00
parent 6c774c966b
commit 181656bd3a
6 changed files with 13 additions and 13 deletions

View File

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

View File

@ -132,7 +132,7 @@ func TestDifficulty(t *testing.T) {
case dagconfig.TestnetParams.Name: case dagconfig.TestnetParams.Name:
expectedBits = uint32(0x1e7f1441) expectedBits = uint32(0x1e7f1441)
case dagconfig.DevnetParams.Name: case dagconfig.DevnetParams.Name:
expectedBits = uint32(0x207f1441) expectedBits = uint32(0x1f4e54ab)
case dagconfig.MainnetParams.Name: case dagconfig.MainnetParams.Name:
expectedBits = uint32(0x1d02c50f) expectedBits = uint32(0x1d02c50f)
} }

View File

@ -38,7 +38,7 @@ func TestPruning(t *testing.T) {
"dag-for-test-pruning.json": { "dag-for-test-pruning.json": {
dagconfig.MainnetParams.Name: "503", dagconfig.MainnetParams.Name: "503",
dagconfig.TestnetParams.Name: "503", dagconfig.TestnetParams.Name: "503",
dagconfig.DevnetParams.Name: "503", dagconfig.DevnetParams.Name: "502",
dagconfig.SimnetParams.Name: "503", dagconfig.SimnetParams.Name: "503",
}, },
} }

View File

@ -105,7 +105,7 @@ var devnetGenesisCoinbaseTx = transactionhelper.NewSubnetworkTransaction(0,
// devGenesisHash is the hash of the first block in the block DAG for the development // devGenesisHash is the hash of the first block in the block DAG for the development
// network (genesis block). // network (genesis block).
var devnetGenesisHash = externalapi.NewDomainHashFromByteArray(&[externalapi.DomainHashSize]byte{ var devnetGenesisHash = externalapi.NewDomainHashFromByteArray(&[externalapi.DomainHashSize]byte{
0x4c, 0x64, 0x16, 0x35, 0xc8, 0x5d, 0xc8, 0x8d, 0x90, 0xbe, 0x2a, 0x42, 0xc1, 0xf6, 0x0f, 0xc4, 0xe9, 0xfc, 0xfc, 0xda, 0xdb, 0x53, 0x0d, 0x51, 0xe3, 0x02, 0x2b, 0x68, 0x65, 0xa6, 0x46, 0x7b, 0xb3, 0x13, 0x87, 0x0a, 0x32, 0xc7, 0x04, 0xbd, 0xf1, 0x21, 0x4a, 0x3b, 0x27, 0x0c, 0xc4, 0x75, 0xd9, 0x42, 0xc2, 0x09, 0x2d, 0x37, 0x9b, 0xc8, 0x70, 0x0a, 0xb0, 0x43, 0x31, 0x9e, 0xf8, 0x46,
}) })
// devnetGenesisMerkleRoot is the hash of the first transaction in the genesis block // devnetGenesisMerkleRoot is the hash of the first transaction in the genesis block
@ -127,7 +127,7 @@ var devnetGenesisBlock = externalapi.DomainBlock{
&externalapi.DomainHash{}, &externalapi.DomainHash{},
externalapi.NewDomainHashFromByteArray(muhash.EmptyMuHashHash.AsArray()), externalapi.NewDomainHashFromByteArray(muhash.EmptyMuHashHash.AsArray()),
0x11e9db49828, 0x11e9db49828,
0x207fffff, 525264379,
0x48e5e, 0x48e5e,
0, 0,
0, 0,

View File

@ -16,7 +16,7 @@ func TestGetHashrateString(t *testing.T) {
var results = map[string]string{ var results = map[string]string{
dagconfig.MainnetParams.Name: "1.53 GH/s", dagconfig.MainnetParams.Name: "1.53 GH/s",
dagconfig.TestnetParams.Name: "131.07 KH/s", dagconfig.TestnetParams.Name: "131.07 KH/s",
dagconfig.DevnetParams.Name: "2 H/s", dagconfig.DevnetParams.Name: "830 H/s",
dagconfig.SimnetParams.Name: "2.00 KH/s", dagconfig.SimnetParams.Name: "2.00 KH/s",
} }
testutils.ForAllNets(t, false, func(t *testing.T, consensusConfig *consensus.Config) { testutils.ForAllNets(t, false, func(t *testing.T, consensusConfig *consensus.Config) {

View File

@ -11,7 +11,7 @@ const validCharacters = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrs
const ( const (
appMajor uint = 0 appMajor uint = 0
appMinor uint = 12 appMinor uint = 12
appPatch uint = 8 appPatch uint = 10
) )
// appBuild is defined as a variable so it can be overridden during the build // appBuild is defined as a variable so it can be overridden during the build