aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorWei-Ning Huang <w@dexon.org>2019-03-07 12:59:49 +0800
committerWei-Ning Huang <w@dexon.org>2019-04-09 21:32:57 +0800
commit1835ee6f172f2e4e15132425e4fe6060f02a9537 (patch)
tree8e7c3c3418b25a2f60c134232d1705a0e691daec /test
parent98d3c3613671a680ac4b680a2ccf9195889819a6 (diff)
downloaddexon-1835ee6f172f2e4e15132425e4fe6060f02a9537.tar
dexon-1835ee6f172f2e4e15132425e4fe6060f02a9537.tar.gz
dexon-1835ee6f172f2e4e15132425e4fe6060f02a9537.tar.bz2
dexon-1835ee6f172f2e4e15132425e4fe6060f02a9537.tar.lz
dexon-1835ee6f172f2e4e15132425e4fe6060f02a9537.tar.xz
dexon-1835ee6f172f2e4e15132425e4fe6060f02a9537.tar.zst
dexon-1835ee6f172f2e4e15132425e4fe6060f02a9537.zip
test: update test parameters (#229)
* test: update test parameters * update smoke test parameter
Diffstat (limited to 'test')
-rw-r--r--test/genesis.json32
-rw-r--r--test/keygen.go4
-rwxr-xr-xtest/run_test.sh4
3 files changed, 21 insertions, 19 deletions
diff --git a/test/genesis.json b/test/genesis.json
index 9bbb97de3..fc6cd7fe4 100644
--- a/test/genesis.json
+++ b/test/genesis.json
@@ -14,18 +14,18 @@
"dexcon": {
"genesisCRSText": "In DEXON, we trust.",
"owner": "0xbf8c48a620bacc46907f9b89732d25e47a2d7cf7",
- "minStake": "0x152d02c7e14af6800000",
+ "minStake": "0xd3c21bcecceda1000000",
"lockupPeriod": 259200000,
"miningVelocity": 0.1875,
"nextHalvingSupply": "0x813f3978f89409844000000",
"lastHalvedAmount": "0x4d8c55aefb8c05b5c000000",
"blockGasLimit": 40000000,
"lambdaBA": 250,
- "lambdaDKG": 2500,
+ "lambdaDKG": 1500,
"notarySetSize": 4,
"dkgSetSize": 4,
- "roundLength": 90,
- "minBlockInterval": 1000,
+ "roundLength": 100,
+ "minBlockInterval": 500,
"fineValues": [
"0x21e19e0c9bab2400000",
"0x21e19e0c9bab2400000",
@@ -55,44 +55,44 @@
"staked": "0"
},
"0x361e4958bd8b4d035C68C473193E77FdAb6aEa9D": {
- "balance": "200000000000000000000000",
- "staked": "100000000000000000000000",
+ "balance": "0x1a784379d99db42000000",
+ "staked": "0xd3c21bcecceda1000000",
"publicKey": "0x040c2f07cf22966ebaa19dd87de11d04f9a606e83e75a5295574760a5a4dd82807e7d9f28f86cd389871dd931a477cac64e233a6f098d5b257871d8163dc1bddcf",
"info": {
- "name": "DEXON1",
+ "name": "DEXON Test Node 0",
"email": "node1@dexon.org",
"location": "Taipei, Taiwan",
"url": "https://dexon.org"
}
},
"0xbC71C0F2aeCa46fa0001e765965029b16a06049E": {
- "balance": "200000000000000000000000",
- "staked": "100000000000000000000000",
+ "balance": "0x1a784379d99db42000000",
+ "staked": "0xd3c21bcecceda1000000",
"publicKey": "0x04a12a015f27d98e5305498d23aeacde281e48aad918ae87d7f61784ab43828953db99bf1f44426294cbc21e32cf3a99122f2ce8a35ba718a7c814eec7bae9a3ea",
"info": {
- "name": "DEXON2",
+ "name": "DEXON Test Node 1",
"email": "node2@dexon.org",
"location": "Taipei, Taiwan",
"url": "https://dexon.org"
}
},
"0xB6a2e270b54F19B4002d6535a71CFDd1CA1f5fC1": {
- "balance": "200000000000000000000000",
- "staked": "100000000000000000000000",
+ "balance": "0x1a784379d99db42000000",
+ "staked": "0xd3c21bcecceda1000000",
"publicKey": "0x0463f78d398f6b042952062a26f3551a4e294a11084b1006c8d6376437b72488d8f3af6b849931c03624ad2d581900e9ad5f3cfeeed040c799e5308cd8012853fb",
"info": {
- "name": "DEXON3",
+ "name": "DEXON Test Node 2",
"email": "node3@dexon.org",
"location": "Taipei, Taiwan",
"url": "https://dexon.org"
}
},
"0xb6bBBE39033131e428d5a3545856a596cacB7810": {
- "balance": "200000000000000000000000",
- "staked": "100000000000000000000000",
+ "balance": "0x1a784379d99db42000000",
+ "staked": "0xd3c21bcecceda1000000",
"publicKey": "0x04a1118c8f1c2e293de528e5b45ac5e65167af4cb4d10887924a9f839287d060da26414e971cab75013e560dfec7897b1983eaa631ae2f16ea4062525310edd8ea",
"info": {
- "name": "DEXON4",
+ "name": "DEXON Test Node 3",
"email": "node4@dexon.org",
"location": "Taipei, Taiwan",
"url": "https://dexon.org"
diff --git a/test/keygen.go b/test/keygen.go
index e7441e146..26b8385ed 100644
--- a/test/keygen.go
+++ b/test/keygen.go
@@ -50,8 +50,8 @@ func main() {
address := crypto.PubkeyToAddress(privKey.PublicKey)
genesis.Alloc[address] = core.GenesisAccount{
- Balance: new(big.Int).Mul(big.NewInt(1e18), big.NewInt(1e6)),
- Staked: new(big.Int).Mul(big.NewInt(1e18), big.NewInt(5e5)),
+ Balance: new(big.Int).Mul(big.NewInt(1e18), big.NewInt(2e6)),
+ Staked: new(big.Int).Mul(big.NewInt(1e18), big.NewInt(1e6)),
PublicKey: crypto.FromECDSAPub(&privKey.PublicKey),
NodeInfo: core.NodeInfo{
Name: fmt.Sprintf("DEXON Test Node %d", i),
diff --git a/test/run_test.sh b/test/run_test.sh
index f995393f6..48934ab7c 100755
--- a/test/run_test.sh
+++ b/test/run_test.sh
@@ -56,8 +56,10 @@ $GDEX \
--wsorigins='*' --rpcvhosts='*' --rpccorsdomain="*" \
> $logsdir/gdex.rpc.log 2>&1 &
+NUM_NODES=$(cat ${GENESIS} | grep 'DEXON Test Node' | wc -l)
+
# Nodes
-for i in $(seq 0 3); do
+for i in $(seq 0 $(($NUM_NODES - 1))); do
datadir=$PWD/Dexon.$i
rm -rf $datadir
$GDEX --datadir=$datadir init ${GENESIS}