|
|
@ -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()) |
|
|
|