Skip to content

Commit

Permalink
reset devnet and set 30M epoch for all network except mainnet/testnet (
Browse files Browse the repository at this point in the history
…#4517)

* enable on devnet hip28 and hip30 together at hip30
* enable 30M epoch for all except mainnet/testnet, update devnet for restart
* remove unused var
* update partner/devnet feature activation
* Remove old devnet/partner instance config
  • Loading branch information
sophoah committed Oct 5, 2023
1 parent 532e28f commit 171e612
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 27 deletions.
20 changes: 0 additions & 20 deletions internal/configs/sharding/partner.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ import (
// configuration schedule.
var PartnerSchedule partnerSchedule

var feeCollectEpochV1 = big.NewInt(574)

var feeCollectorsDevnet = []FeeCollectors{
FeeCollectors{
mustAddress("0xb728AEaBF60fD01816ee9e756c18bc01dC91ba5D"): numeric.OneDec(),
Expand Down Expand Up @@ -43,10 +41,6 @@ const (
func (ps partnerSchedule) InstanceForEpoch(epoch *big.Int) Instance {
switch {
case params.PartnerChainConfig.IsHIP30(epoch):
return partnerV4
case params.PartnerChainConfig.IsFeeCollectEpoch(epoch):
return partnerV3
case epoch.Cmp(feeCollectEpochV1) >= 0:
return partnerV2
case epoch.Cmp(params.PartnerChainConfig.StakingEpoch) >= 0:
return partnerV1
Expand Down Expand Up @@ -110,20 +104,6 @@ var partnerV1 = MustNewInstance(
partnerReshardingEpoch, PartnerSchedule.BlocksPerEpoch(),
)
var partnerV2 = MustNewInstance(
2, 5, 4, 0,
numeric.MustNewDecFromStr("0.9"), genesis.TNHarmonyAccounts,
genesis.TNFoundationalAccounts, emptyAllowlist,
feeCollectorsDevnet[0], numeric.ZeroDec(), ethCommon.Address{},
partnerReshardingEpoch, PartnerSchedule.BlocksPerEpoch(),
)
var partnerV3 = MustNewInstance(
2, 5, 4, 0,
numeric.MustNewDecFromStr("0.9"), genesis.TNHarmonyAccounts,
genesis.TNFoundationalAccounts, emptyAllowlist,
feeCollectorsDevnet[1], numeric.ZeroDec(), ethCommon.Address{},
partnerReshardingEpoch, PartnerSchedule.BlocksPerEpoch(),
)
var partnerV4 = MustNewInstance(
2, 5, 4, 0,
numeric.MustNewDecFromStr("0.9"), genesis.TNHarmonyAccounts,
genesis.TNFoundationalAccounts, emptyAllowlist,
Expand Down
20 changes: 13 additions & 7 deletions internal/params/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ var (
FeeCollectEpoch: big.NewInt(1535), // 2023-07-20 05:51:07+00:00
ValidatorCodeFixEpoch: big.NewInt(1535), // 2023-07-20 05:51:07+00:00
HIP30Epoch: EpochTBD,
BlockGas30MEpoch: EpochTBD,
}

// TestnetChainConfig contains the chain parameters to run a node on the harmony test network.
Expand Down Expand Up @@ -116,6 +117,7 @@ var (
FeeCollectEpoch: big.NewInt(1296), // 2023-04-28 07:14:20+00:00
ValidatorCodeFixEpoch: big.NewInt(1296), // 2023-04-28 07:14:20+00:00
HIP30Epoch: EpochTBD,
BlockGas30MEpoch: EpochTBD,
}
// PangaeaChainConfig contains the chain parameters for the Pangaea network.
// All features except for CrossLink are enabled at launch.
Expand Down Expand Up @@ -158,6 +160,7 @@ var (
FeeCollectEpoch: EpochTBD,
ValidatorCodeFixEpoch: EpochTBD,
HIP30Epoch: EpochTBD,
BlockGas30MEpoch: big.NewInt(0),
}

// PartnerChainConfig contains the chain parameters for the Partner network.
Expand All @@ -175,7 +178,7 @@ var (
QuickUnlockEpoch: big.NewInt(0),
FiveSecondsEpoch: big.NewInt(0),
TwoSecondsEpoch: big.NewInt(0),
SixtyPercentEpoch: big.NewInt(4),
SixtyPercentEpoch: EpochTBD,
RedelegationEpoch: big.NewInt(0),
NoEarlyUnlockEpoch: big.NewInt(0),
VRFEpoch: big.NewInt(0),
Expand All @@ -191,16 +194,17 @@ var (
ReceiptLogEpoch: big.NewInt(0),
SHA3Epoch: big.NewInt(0),
HIP6And8Epoch: big.NewInt(0),
StakingPrecompileEpoch: big.NewInt(2),
ChainIdFixEpoch: big.NewInt(0),
StakingPrecompileEpoch: big.NewInt(5),
ChainIdFixEpoch: big.NewInt(5),
SlotsLimitedEpoch: EpochTBD, // epoch to enable HIP-16
CrossShardXferPrecompileEpoch: big.NewInt(1),
CrossShardXferPrecompileEpoch: big.NewInt(5),
AllowlistEpoch: EpochTBD,
LeaderRotationExternalNonBeaconLeaders: EpochTBD,
LeaderRotationExternalBeaconLeaders: EpochTBD,
FeeCollectEpoch: big.NewInt(848), // 2023-04-28 04:33:33+00:00
ValidatorCodeFixEpoch: big.NewInt(848),
HIP30Epoch: EpochTBD,
FeeCollectEpoch: big.NewInt(5),
ValidatorCodeFixEpoch: big.NewInt(5),
HIP30Epoch: big.NewInt(7),
BlockGas30MEpoch: big.NewInt(7),
}

// StressnetChainConfig contains the chain parameters for the Stress test network.
Expand Down Expand Up @@ -244,6 +248,7 @@ var (
LeaderRotationExternalBeaconLeaders: EpochTBD,
ValidatorCodeFixEpoch: EpochTBD,
HIP30Epoch: EpochTBD,
BlockGas30MEpoch: big.NewInt(0),
}

// LocalnetChainConfig contains the chain parameters to run for local development.
Expand Down Expand Up @@ -286,6 +291,7 @@ var (
FeeCollectEpoch: big.NewInt(2),
ValidatorCodeFixEpoch: big.NewInt(2),
HIP30Epoch: EpochTBD,
BlockGas30MEpoch: big.NewInt(0),
}

// AllProtocolChanges ...
Expand Down

0 comments on commit 171e612

Please sign in to comment.