diff options
author | Wei-Ning Huang <w@dexon.org> | 2019-03-07 12:59:49 +0800 |
---|---|---|
committer | Wei-Ning Huang <w@dexon.org> | 2019-03-12 12:19:09 +0800 |
commit | d6557f080c206ba0ff322d39005af642eb58b12f (patch) | |
tree | 1ba00ccd96149bd317a782a9bf836724ec7c07c7 | |
parent | 10a21c6b7eb2c4d2a186a3a355986a0605b41ca7 (diff) | |
download | dexon-d6557f080c206ba0ff322d39005af642eb58b12f.tar.gz dexon-d6557f080c206ba0ff322d39005af642eb58b12f.tar.zst dexon-d6557f080c206ba0ff322d39005af642eb58b12f.zip |
test: update test parameters (#229)
* test: update test parameters
* update smoke test parameter
-rwxr-xr-x | build/fullnode-test.sh | 8 | ||||
-rw-r--r-- | build/testtool/testtool.go | 2 | ||||
-rw-r--r-- | test/genesis.json | 32 | ||||
-rw-r--r-- | test/keygen.go | 4 | ||||
-rwxr-xr-x | test/run_test.sh | 4 |
5 files changed, 26 insertions, 24 deletions
diff --git a/build/fullnode-test.sh b/build/fullnode-test.sh index 589e707bf..24e555787 100755 --- a/build/fullnode-test.sh +++ b/build/fullnode-test.sh @@ -1,6 +1,6 @@ #!/bin/bash -sleep 20 +sleep 10 tarAndUpload() { @@ -49,7 +49,7 @@ if [ $round -lt 2 ]; then exit 1 fi - echo "Sleep 30 sec wait for next round" - sleep 30 + echo "Sleep 15 sec wait for next round" + sleep 15 fi -done
\ No newline at end of file +done diff --git a/build/testtool/testtool.go b/build/testtool/testtool.go index 09e94fe16..3f880b3bd 100644 --- a/build/testtool/testtool.go +++ b/build/testtool/testtool.go @@ -189,7 +189,7 @@ func doMonkeyTest(args []string) { Endpoint: args[0], N: 30, Sleep: 3000, - Timeout: 60, + Timeout: 30, }) m, nonce := monkey.Exec() 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} |