From 093b67bb2db17150fd994d3b7c3bdfa055cc2ff6 Mon Sep 17 00:00:00 2001 From: Rongjian Lan Date: Thu, 18 Jun 2020 14:13:20 -0700 Subject: [PATCH] Add slot increase for testnet --- internal/configs/sharding/testnet.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/internal/configs/sharding/testnet.go b/internal/configs/sharding/testnet.go index 162903318..0dcff407f 100644 --- a/internal/configs/sharding/testnet.go +++ b/internal/configs/sharding/testnet.go @@ -24,10 +24,14 @@ const ( TestNetHTTPPattern = "https://api.s%d.b.hmny.io" // TestNetWSPattern is the websocket pattern for testnet. TestNetWSPattern = "wss://ws.s%d.b.hmny.io" + + testnetV2Epoch = 6050 // per shard, reduce internal node from 15 to 8, and external nodes from 5 to 22 ) func (ts testnetSchedule) InstanceForEpoch(epoch *big.Int) Instance { switch { + case epoch.Cmp(big.NewInt(testnetV2Epoch)) >= 0: + return testnetV2 case epoch.Cmp(params.TestnetChainConfig.StakingEpoch) >= 0: return testnetV1 default: // genesis @@ -88,3 +92,4 @@ var testnetReshardingEpoch = []*big.Int{ var testnetV0 = MustNewInstance(4, 16, 15, numeric.OneDec(), genesis.TNHarmonyAccounts, genesis.TNFoundationalAccounts, testnetReshardingEpoch, TestnetSchedule.BlocksPerEpoch()) var testnetV1 = MustNewInstance(4, 20, 15, numeric.MustNewDecFromStr("0.90"), genesis.TNHarmonyAccounts, genesis.TNFoundationalAccounts, testnetReshardingEpoch, TestnetSchedule.BlocksPerEpoch()) +var testnetV2 = MustNewInstance(4, 30, 8, numeric.MustNewDecFromStr("0.90"), genesis.TNHarmonyAccounts, genesis.TNFoundationalAccounts, testnetReshardingEpoch, TestnetSchedule.BlocksPerEpoch())