Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

reset devnet and set 30M epoch for all network except mainnet/testnet #4517

Merged
merged 5 commits into from
Oct 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
sophoah marked this conversation as resolved.
Show resolved Hide resolved
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