[stn] enable 40% ext voting power on stn

starting from epoch 10

Signed-off-by: Leo Chen <leo@harmony.one>
pull/3559/head
Leo Chen 4 years ago
parent 6f1e741be6
commit ee61caf70e
  1. 7
      internal/configs/sharding/stress.go
  2. 2
      internal/params/config.go

@ -16,8 +16,8 @@ var StressNetSchedule stressnetSchedule
type stressnetSchedule struct{} type stressnetSchedule struct{}
const ( const (
// ~304 sec epochs for P2 of open staking // ~0.5 hour per epoch
stressnetBlocksPerEpoch = 38 stressnetBlocksPerEpoch = 1024
stressnetVdfDifficulty = 10000 // This takes about 20s to finish the vdf stressnetVdfDifficulty = 10000 // This takes about 20s to finish the vdf
@ -29,6 +29,8 @@ const (
func (ss stressnetSchedule) InstanceForEpoch(epoch *big.Int) Instance { func (ss stressnetSchedule) InstanceForEpoch(epoch *big.Int) Instance {
switch { switch {
case params.StressnetChainConfig.IsSixtyPercent(epoch):
return stressnetV2
case epoch.Cmp(params.StressnetChainConfig.StakingEpoch) >= 0: case epoch.Cmp(params.StressnetChainConfig.StakingEpoch) >= 0:
return stressnetV1 return stressnetV1
default: // genesis default: // genesis
@ -84,3 +86,4 @@ var stressnetReshardingEpoch = []*big.Int{
var stressnetV0 = MustNewInstance(2, 10, 10, numeric.OneDec(), genesis.TNHarmonyAccounts, genesis.TNFoundationalAccounts, stressnetReshardingEpoch, StressNetSchedule.BlocksPerEpoch()) var stressnetV0 = MustNewInstance(2, 10, 10, numeric.OneDec(), genesis.TNHarmonyAccounts, genesis.TNFoundationalAccounts, stressnetReshardingEpoch, StressNetSchedule.BlocksPerEpoch())
var stressnetV1 = MustNewInstance(2, 30, 10, numeric.MustNewDecFromStr("0.9"), genesis.TNHarmonyAccounts, genesis.TNFoundationalAccounts, stressnetReshardingEpoch, StressNetSchedule.BlocksPerEpoch()) var stressnetV1 = MustNewInstance(2, 30, 10, numeric.MustNewDecFromStr("0.9"), genesis.TNHarmonyAccounts, genesis.TNFoundationalAccounts, stressnetReshardingEpoch, StressNetSchedule.BlocksPerEpoch())
var stressnetV2 = MustNewInstance(2, 30, 10, numeric.MustNewDecFromStr("0.6"), genesis.TNHarmonyAccounts, genesis.TNFoundationalAccounts, stressnetReshardingEpoch, StressNetSchedule.BlocksPerEpoch())

@ -134,7 +134,7 @@ var (
QuickUnlockEpoch: big.NewInt(0), QuickUnlockEpoch: big.NewInt(0),
FiveSecondsEpoch: big.NewInt(0), FiveSecondsEpoch: big.NewInt(0),
TwoSecondsEpoch: big.NewInt(0), TwoSecondsEpoch: big.NewInt(0),
SixtyPercentEpoch: EpochTBD, // Never enable it for STN as STN has no external validator setup SixtyPercentEpoch: big.NewInt(10),
RedelegationEpoch: big.NewInt(0), RedelegationEpoch: big.NewInt(0),
EIP155Epoch: big.NewInt(0), EIP155Epoch: big.NewInt(0),
S3Epoch: big.NewInt(0), S3Epoch: big.NewInt(0),

Loading…
Cancel
Save