Skip to content

Commit

Permalink
HIP32 epoch activation and new sharding config (#4769)
Browse files Browse the repository at this point in the history
* 2151 epoch as 2024-10-30 19:50 UTC.
* Mainnet v5 with new sharding config
  • Loading branch information
Frozen authored Oct 8, 2024
1 parent 1588c05 commit 672cd76
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
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

0 comments on commit 672cd76

Please sign in to comment.