Merge pull request #1969 from harmony-ek/pangaea_staking

Schedule Pangaea staking epochs
pull/1972/head master-20191205.0
Eugene Kim 5 years ago committed by GitHub
commit b7282a1ef3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      internal/configs/sharding/testnet.go
  2. 6
      internal/params/config.go

@ -4,6 +4,7 @@ import (
"math/big" "math/big"
"github.com/harmony-one/harmony/internal/genesis" "github.com/harmony-one/harmony/internal/genesis"
"github.com/harmony-one/harmony/internal/params"
) )
// TestnetSchedule is the long-running public testnet sharding // TestnetSchedule is the long-running public testnet sharding
@ -26,6 +27,8 @@ const (
func (testnetSchedule) InstanceForEpoch(epoch *big.Int) Instance { func (testnetSchedule) InstanceForEpoch(epoch *big.Int) Instance {
switch { switch {
case epoch.Cmp(params.PangaeaChainConfig.StakingEpoch) >= 0:
return testnetV1
default: // genesis default: // genesis
return testnetV0 return testnetV0
} }
@ -74,6 +77,8 @@ func (ts testnetSchedule) GetShardingStructure(numShard, shardID int) []map[stri
var testnetReshardingEpoch = []*big.Int{ var testnetReshardingEpoch = []*big.Int{
big.NewInt(0), big.NewInt(0),
params.PangaeaChainConfig.StakingEpoch,
} }
var testnetV0 = MustNewInstance(3, 100, 80, genesis.TNHarmonyAccounts, genesis.TNFoundationalAccounts, testnetReshardingEpoch) var testnetV0 = MustNewInstance(3, 100, 80, genesis.TNHarmonyAccounts, genesis.TNFoundationalAccounts, testnetReshardingEpoch)
var testnetV1 = MustNewInstance(3, 100, 68, genesis.TNHarmonyAccounts, genesis.TNFoundationalAccounts, testnetReshardingEpoch)

@ -36,9 +36,9 @@ var (
TestnetChainConfig = &ChainConfig{ TestnetChainConfig = &ChainConfig{
ChainID: TestnetChainID, ChainID: TestnetChainID,
CrossTxEpoch: big.NewInt(0), CrossTxEpoch: big.NewInt(0),
CrossLinkEpoch: big.NewInt(2), CrossLinkEpoch: big.NewInt(5256),
StakingEpoch: big.NewInt(3), StakingEpoch: big.NewInt(5328), // around 2019-12-06T05:46:17Z
PreStakingEpoch: big.NewInt(0), PreStakingEpoch: big.NewInt(5256), // around 2019-12-05T17:46:17Z
EIP155Epoch: big.NewInt(0), EIP155Epoch: big.NewInt(0),
S3Epoch: big.NewInt(0), S3Epoch: big.NewInt(0),
} }

Loading…
Cancel
Save