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

HIP32 epoch activation and new sharding config #4769

Merged
merged 2 commits into from
Oct 8, 2024
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
11 changes: 11 additions & 0 deletions internal/configs/sharding/mainnet.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ type mainnetSchedule struct{}

func (ms mainnetSchedule) InstanceForEpoch(epoch *big.Int) Instance {
switch {
case params.MainnetChainConfig.IsHIP32(epoch):
return mainnetV5
case params.MainnetChainConfig.IsHIP30(epoch):
return mainnetV4
case params.MainnetChainConfig.IsFeeCollectEpoch(epoch):
Expand Down Expand Up @@ -376,4 +378,13 @@ var (
hip30CollectionAddress, mainnetReshardingEpoch,
MainnetSchedule.BlocksPerEpoch(),
)
mainnetV5 = MustNewInstance(
2, 200, 2, 0.06,
numeric.MustNewDecFromStr("0.01"),
genesis.HarmonyAccountsPostHIP30,
genesis.FoundationalNodeAccountsV1_5, emptyAllowlist,
feeCollectorsMainnet, numeric.MustNewDecFromStr("0.25"),
hip30CollectionAddress, mainnetReshardingEpoch,
MainnetSchedule.BlocksPerEpoch(),
)
)
5 changes: 3 additions & 2 deletions internal/params/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ var (
SlotsLimitedEpoch: big.NewInt(999), // Around Fri, 27 May 2022 09:41:02 UTC with 2s block time
CrossShardXferPrecompileEpoch: big.NewInt(1323), // Around Wed 8 Feb 11:30PM UTC
AllowlistEpoch: EpochTBD,
LeaderRotationInternalValidatorsEpoch: EpochTBD,
LeaderRotationExternalValidatorsEpoch: EpochTBD,
LeaderRotationInternalValidatorsEpoch: big.NewInt(2151), // 2024-10-30 19:50 UTC
LeaderRotationExternalValidatorsEpoch: big.NewInt(2151), // 2024-10-30 19:50 UTC
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: big.NewInt(1673), // 2023-11-02 17:30:00+00:00
Expand All @@ -79,6 +79,7 @@ var (
MaxRateEpoch: big.NewInt(1733), // 2023-12-17 12:20:15+00:00
DevnetExternalEpoch: EpochTBD,
TestnetExternalEpoch: EpochTBD,
HIP32Epoch: big.NewInt(2151), // 2024-10-30 19:50 UTC
}

// TestnetChainConfig contains the chain parameters to run a node on the harmony test network.
Expand Down