aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorWei-Ning Huang <w@cobinhood.com>2018-10-16 12:17:29 +0800
committerWei-Ning Huang <w@dexon.org>2019-04-09 21:32:50 +0800
commit17013051f2ece1924bd5fcdb46fb439671ee5dfd (patch)
tree02334462e75aecbb57a1d41ba06d674bee47f3e6 /test
parent0050e7ffb8dbf0b9e02e3a00e7c4634ae0ce30a9 (diff)
downloaddexon-17013051f2ece1924bd5fcdb46fb439671ee5dfd.tar.gz
dexon-17013051f2ece1924bd5fcdb46fb439671ee5dfd.tar.zst
dexon-17013051f2ece1924bd5fcdb46fb439671ee5dfd.zip
test: update genesis and keypairs
Diffstat (limited to 'test')
-rw-r--r--test/genesis.json35
-rw-r--r--test/keygen.go28
-rwxr-xr-xtest/run_test.sh2
-rw-r--r--test/test0.nodekey1
-rw-r--r--test/test1.nodekey2
-rw-r--r--test/test2.nodekey2
-rw-r--r--test/test3.nodekey2
-rw-r--r--test/test4.nodekey1
-rw-r--r--test/test5.nodekey1
-rw-r--r--test/test6.nodekey1
-rw-r--r--test/test7.nodekey1
11 files changed, 43 insertions, 33 deletions
diff --git a/test/genesis.json b/test/genesis.json
index d2956e6e7..2963aaf3c 100644
--- a/test/genesis.json
+++ b/test/genesis.json
@@ -8,13 +8,13 @@
"eip158Block": 0,
"dexcon": {
"genesisCRSText": "In DEXON, we trust.",
- "numChains": 3,
+ "numChains": 1,
"lambdaBA": 250,
"lambdaDKG": 2500,
"k": 0,
"phiRatio": 667000,
"notarySetSize": 4,
- "dkgSetSize": 7,
+ "dkgSetSize": 4,
"roundInterval": 600000,
"minBlockInterval": 900,
"maxBlockInterval": 1100
@@ -28,40 +28,25 @@
"mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"coinbase": "0x0000000000000000000000000000000000000000",
"alloc": {
- "0x24F7C8133C6996446f6343FD321d9dB70115DB6E": {
+ "0x7C3c31B19395A5e2627F921Cc2802560B71f1caB": {
"balance": "1000000000000000000000",
"staked": "500000000000000000000",
- "publicKey": "0x02ee69fa89ffa168d756cae888a17b7c0369998016fc14776c483bcb955a6db823"
+ "publicKey": "0x025477069c1fe7cc2825cdb55d161eb6608c8bb125a55bc746d4cf745e60b08bb1"
},
- "0x99281d5aFC2F6101D1D451892B4fCB280406daf3": {
+ "0x9b507545785F22982F5C25f9e7a8f881423A6348": {
"balance": "1000000000000000000000",
"staked": "500000000000000000000",
- "publicKey": "0x021f6cabbfc264ee9e242921d0de0d901a900ca2c451fe5257bc4db02869bbbd55"
+ "publicKey": "0x02d723ec266a229e0f8cc4a907776ce09152ef73c55a55c0fb289c182efea1ed74"
},
- "0x28Da0D80213e15F26bE1dE695C3C0ECE82EeF95E": {
+ "0xCC275C8712Cb4c5d02f1c9E0EE7810e474e6350B": {
"balance": "1000000000000000000000",
"staked": "500000000000000000000",
- "publicKey": "0x035aeb928cf45dbd2ebd6f02e7ac47daddfd0491ba0e038c895e2186f9a01b262b"
+ "publicKey": "0x03a6ab84d92f9f9684e2f6ddeff736f428a88ca5aca2873ea60557aedcf452db90"
},
- "0x5fa3d3d095eBD1943763312770AfB284c057a5c6": {
+ "0x6177f5C9Dd006A7026A14139CdDDB013025098Bf": {
"balance": "1000000000000000000000",
"staked": "500000000000000000000",
- "publicKey": "0x030be934e3078764278ded0102e5c726d8db18a4d3104efe67ed3ed600e05efeef"
- },
- "0x1d9055b16489A742d873c5D2e1e34b50661AeE8c": {
- "balance": "1000000000000000000000",
- "staked": "500000000000000000000",
- "publicKey": "0x03ac5de037df890780a7538d3bd8481109e850edbf6d202b6d60f8d096b5fb8c8b"
- },
- "0xF382F8BdF168Ba8EA6F07184641c1604Ec735a4c": {
- "balance": "1000000000000000000000",
- "staked": "500000000000000000000",
- "publicKey": "0x02fe12385b136ce35935227688e93defb03cd6a1ace14414afd162cad0be5ec326"
- },
- "0xD57dDa4a389247423f60582AD68B739FaFD2C439": {
- "balance": "1000000000000000000000",
- "staked": "500000000000000000000",
- "publicKey": "0x0315ea2646aa13ae6d0eddf07032e36688de9f8c7bf02192deb0fcdcaa7ec9666f"
+ "publicKey": "0x03cac6efc54d32b52b13b8ba01c902c125dbdd0657707277e1320868ef2a1599e6"
}
}
}
diff --git a/test/keygen.go b/test/keygen.go
new file mode 100644
index 000000000..b2c789723
--- /dev/null
+++ b/test/keygen.go
@@ -0,0 +1,28 @@
+package main
+
+import (
+ "encoding/hex"
+ "fmt"
+
+ "github.com/dexon-foundation/dexon/crypto"
+)
+
+func main() {
+ for i := 0; i < 4; i++ {
+ privKey, err := crypto.GenerateKey()
+ if err != nil {
+ panic(err)
+ }
+ address := crypto.PubkeyToAddress(privKey.PublicKey).String()
+ pk := hex.EncodeToString(crypto.CompressPubkey(&privKey.PublicKey))
+
+ fmt.Printf(`
+ "%s": {
+ "balance": "1000000000000000000000",
+ "staked": "500000000000000000000",
+ "publicKey": "0x%s"
+ },`, address, pk)
+
+ crypto.SaveECDSA(fmt.Sprintf("test%d.nodekey", i), privKey)
+ }
+}
diff --git a/test/run_test.sh b/test/run_test.sh
index 53c375705..df3505a00 100755
--- a/test/run_test.sh
+++ b/test/run_test.sh
@@ -6,7 +6,7 @@ pkill -9 -f geth
bootnode -nodekey bootnode.key --verbosity=9 > bootnode.log 2>&1 &
-for i in $(seq 1 7); do
+for i in $(seq 0 3); do
datadir=$PWD/Dexon.$i
rm -rf $datadir
$GETH --datadir=$datadir init genesis.json
diff --git a/test/test0.nodekey b/test/test0.nodekey
new file mode 100644
index 000000000..51c29073b
--- /dev/null
+++ b/test/test0.nodekey
@@ -0,0 +1 @@
+fb5efc249ba2db0edb80b0ccd08b32a4b98ff7c7684318137a5bb205f08a8f9f \ No newline at end of file
diff --git a/test/test1.nodekey b/test/test1.nodekey
index 899c0fa90..aecdc8a5f 100644
--- a/test/test1.nodekey
+++ b/test/test1.nodekey
@@ -1 +1 @@
-a60cfa0d9c2be2bd4ac5fb0122d07bfedd6791a8d1fb63298b6d3668b29f653f \ No newline at end of file
+1d547b9b710c6d11e68805a1250a5b9ec6345051d56115b3b9af16419214f32a \ No newline at end of file
diff --git a/test/test2.nodekey b/test/test2.nodekey
index fe3ee658d..74740daac 100644
--- a/test/test2.nodekey
+++ b/test/test2.nodekey
@@ -1 +1 @@
-d0affc191ebffb19bfbfcefc33f6184b2d4b15ac3f0a3061f7ebd9e3a77a8597 \ No newline at end of file
+d5f3d1638dc20c9475edbf98da723aba49f666847f7ae3e09b60d1b73ff249a0 \ No newline at end of file
diff --git a/test/test3.nodekey b/test/test3.nodekey
index 05be442dd..ea5bb63e2 100644
--- a/test/test3.nodekey
+++ b/test/test3.nodekey
@@ -1 +1 @@
-105b56e01f35a0ca75a1dd29e5f3fdd45a5a52d935dee6c4766cbe9ee4cd47fa \ No newline at end of file
+bfd1d410f07fd28820bb75856aaa7975b7844222bab7c159ffe28b3dfb2417ad \ No newline at end of file
diff --git a/test/test4.nodekey b/test/test4.nodekey
deleted file mode 100644
index 0abb56447..000000000
--- a/test/test4.nodekey
+++ /dev/null
@@ -1 +0,0 @@
-d38fd0284e90bacf671843846774e42511f4454e9b9e88c5ae7babb0d2c48211 \ No newline at end of file
diff --git a/test/test5.nodekey b/test/test5.nodekey
deleted file mode 100644
index 92495d2d1..000000000
--- a/test/test5.nodekey
+++ /dev/null
@@ -1 +0,0 @@
-051bad93cff54509fc12d18ba0d544aed9ab547f12fef62262960a64b0dbed55 \ No newline at end of file
diff --git a/test/test6.nodekey b/test/test6.nodekey
deleted file mode 100644
index 63ea82456..000000000
--- a/test/test6.nodekey
+++ /dev/null
@@ -1 +0,0 @@
-b3cb1dc705053c6e50d3b7de43b304c772f54288f4b4c73ab5d6a7c9e9c224e2 \ No newline at end of file
diff --git a/test/test7.nodekey b/test/test7.nodekey
deleted file mode 100644
index 8feba16c1..000000000
--- a/test/test7.nodekey
+++ /dev/null
@@ -1 +0,0 @@
-a85f1da3ac0af7b137897725ba4418888c019ef72f1e335b7c4cf8ef7814bc38 \ No newline at end of file