|
|
|
@ -36,269 +36,269 @@ var once sync.Once |
|
|
|
|
var ( |
|
|
|
|
// MainnetChainConfig is the chain parameters to run a node on the main network.
|
|
|
|
|
MainnetChainConfig = &ChainConfig{ |
|
|
|
|
ChainID: MainnetChainID, |
|
|
|
|
EthCompatibleChainID: EthMainnetShard0ChainID, |
|
|
|
|
EthCompatibleShard0ChainID: EthMainnetShard0ChainID, |
|
|
|
|
EthCompatibleEpoch: big.NewInt(442), // Around Thursday Feb 4th 2020, 10AM PST
|
|
|
|
|
CrossTxEpoch: big.NewInt(28), |
|
|
|
|
CrossLinkEpoch: big.NewInt(186), |
|
|
|
|
AggregatedRewardEpoch: big.NewInt(689), // Around Wed Sept 15th 2021 with 3.5s block time
|
|
|
|
|
StakingEpoch: big.NewInt(186), |
|
|
|
|
PreStakingEpoch: big.NewInt(185), |
|
|
|
|
QuickUnlockEpoch: big.NewInt(191), |
|
|
|
|
FiveSecondsEpoch: big.NewInt(230), |
|
|
|
|
TwoSecondsEpoch: big.NewInt(366), // Around Tuesday Dec 8th 2020, 8AM PST
|
|
|
|
|
SixtyPercentEpoch: big.NewInt(530), // Around Monday Apr 12th 2021, 22:30 UTC
|
|
|
|
|
RedelegationEpoch: big.NewInt(290), |
|
|
|
|
NoEarlyUnlockEpoch: big.NewInt(530), // Around Monday Apr 12th 2021, 22:30 UTC
|
|
|
|
|
VRFEpoch: big.NewInt(631), // Around Wed July 7th 2021
|
|
|
|
|
PrevVRFEpoch: big.NewInt(689), // Around Wed Sept 15th 2021 with 3.5s block time
|
|
|
|
|
MinDelegation100Epoch: big.NewInt(631), // Around Wed July 7th 2021
|
|
|
|
|
MinCommissionRateEpoch: big.NewInt(631), // Around Wed July 7th 2021
|
|
|
|
|
MinCommissionPromoPeriod: big.NewInt(100), |
|
|
|
|
EPoSBound35Epoch: big.NewInt(631), // Around Wed July 7th 2021
|
|
|
|
|
EIP155Epoch: big.NewInt(28), |
|
|
|
|
S3Epoch: big.NewInt(28), |
|
|
|
|
DataCopyFixEpoch: big.NewInt(689), // Around Wed Sept 15th 2021 with 3.5s block time
|
|
|
|
|
IstanbulEpoch: big.NewInt(314), |
|
|
|
|
ReceiptLogEpoch: big.NewInt(101), |
|
|
|
|
SHA3Epoch: big.NewInt(725), // Around Mon Oct 11 2021, 19:00 UTC
|
|
|
|
|
HIP6And8Epoch: big.NewInt(725), // Around Mon Oct 11 2021, 19:00 UTC
|
|
|
|
|
StakingPrecompileEpoch: big.NewInt(871), // Around Tue Feb 11 2022
|
|
|
|
|
ChainIdFixEpoch: big.NewInt(1323), // Around Wed 8 Feb 11:30PM UTC
|
|
|
|
|
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, |
|
|
|
|
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
|
|
|
|
|
NoNilDelegationsEpoch: EpochTBD, |
|
|
|
|
BlockGas30MEpoch: big.NewInt(1673), // 2023-11-02 17:30:00+00:00
|
|
|
|
|
ChainID: MainnetChainID, |
|
|
|
|
EthCompatibleChainID: EthMainnetShard0ChainID, |
|
|
|
|
EthCompatibleShard0ChainID: EthMainnetShard0ChainID, |
|
|
|
|
EthCompatibleEpoch: big.NewInt(442), // Around Thursday Feb 4th 2020, 10AM PST
|
|
|
|
|
CrossTxEpoch: big.NewInt(28), |
|
|
|
|
CrossLinkEpoch: big.NewInt(186), |
|
|
|
|
AggregatedRewardEpoch: big.NewInt(689), // Around Wed Sept 15th 2021 with 3.5s block time
|
|
|
|
|
StakingEpoch: big.NewInt(186), |
|
|
|
|
PreStakingEpoch: big.NewInt(185), |
|
|
|
|
QuickUnlockEpoch: big.NewInt(191), |
|
|
|
|
FiveSecondsEpoch: big.NewInt(230), |
|
|
|
|
TwoSecondsEpoch: big.NewInt(366), // Around Tuesday Dec 8th 2020, 8AM PST
|
|
|
|
|
SixtyPercentEpoch: big.NewInt(530), // Around Monday Apr 12th 2021, 22:30 UTC
|
|
|
|
|
RedelegationEpoch: big.NewInt(290), |
|
|
|
|
NoEarlyUnlockEpoch: big.NewInt(530), // Around Monday Apr 12th 2021, 22:30 UTC
|
|
|
|
|
VRFEpoch: big.NewInt(631), // Around Wed July 7th 2021
|
|
|
|
|
PrevVRFEpoch: big.NewInt(689), // Around Wed Sept 15th 2021 with 3.5s block time
|
|
|
|
|
MinDelegation100Epoch: big.NewInt(631), // Around Wed July 7th 2021
|
|
|
|
|
MinCommissionRateEpoch: big.NewInt(631), // Around Wed July 7th 2021
|
|
|
|
|
MinCommissionPromoPeriod: big.NewInt(100), |
|
|
|
|
EPoSBound35Epoch: big.NewInt(631), // Around Wed July 7th 2021
|
|
|
|
|
EIP155Epoch: big.NewInt(28), |
|
|
|
|
S3Epoch: big.NewInt(28), |
|
|
|
|
DataCopyFixEpoch: big.NewInt(689), // Around Wed Sept 15th 2021 with 3.5s block time
|
|
|
|
|
IstanbulEpoch: big.NewInt(314), |
|
|
|
|
ReceiptLogEpoch: big.NewInt(101), |
|
|
|
|
SHA3Epoch: big.NewInt(725), // Around Mon Oct 11 2021, 19:00 UTC
|
|
|
|
|
HIP6And8Epoch: big.NewInt(725), // Around Mon Oct 11 2021, 19:00 UTC
|
|
|
|
|
StakingPrecompileEpoch: big.NewInt(871), // Around Tue Feb 11 2022
|
|
|
|
|
ChainIdFixEpoch: big.NewInt(1323), // Around Wed 8 Feb 11:30PM UTC
|
|
|
|
|
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, |
|
|
|
|
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
|
|
|
|
|
NoNilDelegationsEpoch: EpochTBD, |
|
|
|
|
BlockGas30MEpoch: big.NewInt(1673), // 2023-11-02 17:30:00+00:00
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// TestnetChainConfig contains the chain parameters to run a node on the harmony test network.
|
|
|
|
|
TestnetChainConfig = &ChainConfig{ |
|
|
|
|
ChainID: TestnetChainID, |
|
|
|
|
EthCompatibleChainID: EthTestnetShard0ChainID, |
|
|
|
|
EthCompatibleShard0ChainID: EthTestnetShard0ChainID, |
|
|
|
|
EthCompatibleEpoch: big.NewInt(0), |
|
|
|
|
CrossTxEpoch: big.NewInt(0), |
|
|
|
|
CrossLinkEpoch: big.NewInt(2), |
|
|
|
|
AggregatedRewardEpoch: big.NewInt(2), |
|
|
|
|
StakingEpoch: big.NewInt(2), |
|
|
|
|
PreStakingEpoch: big.NewInt(1), |
|
|
|
|
QuickUnlockEpoch: big.NewInt(0), |
|
|
|
|
FiveSecondsEpoch: big.NewInt(0), |
|
|
|
|
TwoSecondsEpoch: big.NewInt(2), |
|
|
|
|
SixtyPercentEpoch: big.NewInt(2), |
|
|
|
|
RedelegationEpoch: big.NewInt(2), |
|
|
|
|
NoEarlyUnlockEpoch: big.NewInt(2), |
|
|
|
|
VRFEpoch: big.NewInt(2), |
|
|
|
|
PrevVRFEpoch: big.NewInt(2), |
|
|
|
|
MinDelegation100Epoch: big.NewInt(2), |
|
|
|
|
MinCommissionRateEpoch: big.NewInt(2), |
|
|
|
|
MinCommissionPromoPeriod: big.NewInt(2), |
|
|
|
|
EPoSBound35Epoch: big.NewInt(2), |
|
|
|
|
EIP155Epoch: big.NewInt(0), |
|
|
|
|
S3Epoch: big.NewInt(0), |
|
|
|
|
DataCopyFixEpoch: big.NewInt(0), |
|
|
|
|
IstanbulEpoch: big.NewInt(0), |
|
|
|
|
ReceiptLogEpoch: big.NewInt(0), |
|
|
|
|
SHA3Epoch: big.NewInt(0), |
|
|
|
|
HIP6And8Epoch: big.NewInt(2), |
|
|
|
|
StakingPrecompileEpoch: big.NewInt(2), |
|
|
|
|
SlotsLimitedEpoch: big.NewInt(2), |
|
|
|
|
ChainIdFixEpoch: big.NewInt(0), |
|
|
|
|
CrossShardXferPrecompileEpoch: big.NewInt(2), |
|
|
|
|
AllowlistEpoch: big.NewInt(2), |
|
|
|
|
LeaderRotationInternalValidatorsEpoch: EpochTBD, |
|
|
|
|
LeaderRotationExternalValidatorsEpoch: EpochTBD, |
|
|
|
|
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: big.NewInt(2176), // 2023-10-12 10:00:00+00:00
|
|
|
|
|
NoNilDelegationsEpoch: EpochTBD, |
|
|
|
|
BlockGas30MEpoch: big.NewInt(2176), // 2023-10-12 10:00:00+00:00
|
|
|
|
|
ChainID: TestnetChainID, |
|
|
|
|
EthCompatibleChainID: EthTestnetShard0ChainID, |
|
|
|
|
EthCompatibleShard0ChainID: EthTestnetShard0ChainID, |
|
|
|
|
EthCompatibleEpoch: big.NewInt(0), |
|
|
|
|
CrossTxEpoch: big.NewInt(0), |
|
|
|
|
CrossLinkEpoch: big.NewInt(2), |
|
|
|
|
AggregatedRewardEpoch: big.NewInt(2), |
|
|
|
|
StakingEpoch: big.NewInt(2), |
|
|
|
|
PreStakingEpoch: big.NewInt(1), |
|
|
|
|
QuickUnlockEpoch: big.NewInt(0), |
|
|
|
|
FiveSecondsEpoch: big.NewInt(0), |
|
|
|
|
TwoSecondsEpoch: big.NewInt(2), |
|
|
|
|
SixtyPercentEpoch: big.NewInt(2), |
|
|
|
|
RedelegationEpoch: big.NewInt(2), |
|
|
|
|
NoEarlyUnlockEpoch: big.NewInt(2), |
|
|
|
|
VRFEpoch: big.NewInt(2), |
|
|
|
|
PrevVRFEpoch: big.NewInt(2), |
|
|
|
|
MinDelegation100Epoch: big.NewInt(2), |
|
|
|
|
MinCommissionRateEpoch: big.NewInt(2), |
|
|
|
|
MinCommissionPromoPeriod: big.NewInt(2), |
|
|
|
|
EPoSBound35Epoch: big.NewInt(2), |
|
|
|
|
EIP155Epoch: big.NewInt(0), |
|
|
|
|
S3Epoch: big.NewInt(0), |
|
|
|
|
DataCopyFixEpoch: big.NewInt(0), |
|
|
|
|
IstanbulEpoch: big.NewInt(0), |
|
|
|
|
ReceiptLogEpoch: big.NewInt(0), |
|
|
|
|
SHA3Epoch: big.NewInt(0), |
|
|
|
|
HIP6And8Epoch: big.NewInt(2), |
|
|
|
|
StakingPrecompileEpoch: big.NewInt(2), |
|
|
|
|
SlotsLimitedEpoch: big.NewInt(2), |
|
|
|
|
ChainIdFixEpoch: big.NewInt(0), |
|
|
|
|
CrossShardXferPrecompileEpoch: big.NewInt(2), |
|
|
|
|
AllowlistEpoch: big.NewInt(2), |
|
|
|
|
LeaderRotationInternalValidatorsEpoch: EpochTBD, |
|
|
|
|
LeaderRotationExternalValidatorsEpoch: EpochTBD, |
|
|
|
|
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: big.NewInt(2176), // 2023-10-12 10:00:00+00:00
|
|
|
|
|
NoNilDelegationsEpoch: EpochTBD, |
|
|
|
|
BlockGas30MEpoch: big.NewInt(2176), // 2023-10-12 10:00:00+00:00
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
// PangaeaChainConfig contains the chain parameters for the Pangaea network.
|
|
|
|
|
// All features except for CrossLink are enabled at launch.
|
|
|
|
|
PangaeaChainConfig = &ChainConfig{ |
|
|
|
|
ChainID: PangaeaChainID, |
|
|
|
|
EthCompatibleChainID: EthPangaeaShard0ChainID, |
|
|
|
|
EthCompatibleShard0ChainID: EthPangaeaShard0ChainID, |
|
|
|
|
EthCompatibleEpoch: big.NewInt(0), |
|
|
|
|
CrossTxEpoch: big.NewInt(0), |
|
|
|
|
CrossLinkEpoch: big.NewInt(2), |
|
|
|
|
AggregatedRewardEpoch: big.NewInt(3), |
|
|
|
|
StakingEpoch: big.NewInt(2), |
|
|
|
|
PreStakingEpoch: big.NewInt(1), |
|
|
|
|
QuickUnlockEpoch: big.NewInt(0), |
|
|
|
|
FiveSecondsEpoch: big.NewInt(0), |
|
|
|
|
TwoSecondsEpoch: big.NewInt(0), |
|
|
|
|
SixtyPercentEpoch: big.NewInt(0), |
|
|
|
|
RedelegationEpoch: big.NewInt(0), |
|
|
|
|
NoEarlyUnlockEpoch: big.NewInt(0), |
|
|
|
|
VRFEpoch: big.NewInt(0), |
|
|
|
|
PrevVRFEpoch: big.NewInt(0), |
|
|
|
|
MinDelegation100Epoch: big.NewInt(0), |
|
|
|
|
MinCommissionRateEpoch: big.NewInt(0), |
|
|
|
|
MinCommissionPromoPeriod: big.NewInt(10), |
|
|
|
|
EPoSBound35Epoch: big.NewInt(0), |
|
|
|
|
EIP155Epoch: big.NewInt(0), |
|
|
|
|
S3Epoch: big.NewInt(0), |
|
|
|
|
DataCopyFixEpoch: big.NewInt(0), |
|
|
|
|
IstanbulEpoch: big.NewInt(0), |
|
|
|
|
ReceiptLogEpoch: big.NewInt(0), |
|
|
|
|
SHA3Epoch: big.NewInt(0), |
|
|
|
|
HIP6And8Epoch: big.NewInt(0), |
|
|
|
|
StakingPrecompileEpoch: big.NewInt(2), // same as staking
|
|
|
|
|
ChainIdFixEpoch: big.NewInt(0), |
|
|
|
|
SlotsLimitedEpoch: EpochTBD, // epoch to enable HIP-16
|
|
|
|
|
CrossShardXferPrecompileEpoch: big.NewInt(1), |
|
|
|
|
AllowlistEpoch: EpochTBD, |
|
|
|
|
LeaderRotationInternalValidatorsEpoch: EpochTBD, |
|
|
|
|
LeaderRotationExternalValidatorsEpoch: EpochTBD, |
|
|
|
|
FeeCollectEpoch: EpochTBD, |
|
|
|
|
ValidatorCodeFixEpoch: EpochTBD, |
|
|
|
|
HIP30Epoch: EpochTBD, |
|
|
|
|
NoNilDelegationsEpoch: EpochTBD, |
|
|
|
|
BlockGas30MEpoch: big.NewInt(0), |
|
|
|
|
ChainID: PangaeaChainID, |
|
|
|
|
EthCompatibleChainID: EthPangaeaShard0ChainID, |
|
|
|
|
EthCompatibleShard0ChainID: EthPangaeaShard0ChainID, |
|
|
|
|
EthCompatibleEpoch: big.NewInt(0), |
|
|
|
|
CrossTxEpoch: big.NewInt(0), |
|
|
|
|
CrossLinkEpoch: big.NewInt(2), |
|
|
|
|
AggregatedRewardEpoch: big.NewInt(3), |
|
|
|
|
StakingEpoch: big.NewInt(2), |
|
|
|
|
PreStakingEpoch: big.NewInt(1), |
|
|
|
|
QuickUnlockEpoch: big.NewInt(0), |
|
|
|
|
FiveSecondsEpoch: big.NewInt(0), |
|
|
|
|
TwoSecondsEpoch: big.NewInt(0), |
|
|
|
|
SixtyPercentEpoch: big.NewInt(0), |
|
|
|
|
RedelegationEpoch: big.NewInt(0), |
|
|
|
|
NoEarlyUnlockEpoch: big.NewInt(0), |
|
|
|
|
VRFEpoch: big.NewInt(0), |
|
|
|
|
PrevVRFEpoch: big.NewInt(0), |
|
|
|
|
MinDelegation100Epoch: big.NewInt(0), |
|
|
|
|
MinCommissionRateEpoch: big.NewInt(0), |
|
|
|
|
MinCommissionPromoPeriod: big.NewInt(10), |
|
|
|
|
EPoSBound35Epoch: big.NewInt(0), |
|
|
|
|
EIP155Epoch: big.NewInt(0), |
|
|
|
|
S3Epoch: big.NewInt(0), |
|
|
|
|
DataCopyFixEpoch: big.NewInt(0), |
|
|
|
|
IstanbulEpoch: big.NewInt(0), |
|
|
|
|
ReceiptLogEpoch: big.NewInt(0), |
|
|
|
|
SHA3Epoch: big.NewInt(0), |
|
|
|
|
HIP6And8Epoch: big.NewInt(0), |
|
|
|
|
StakingPrecompileEpoch: big.NewInt(2), // same as staking
|
|
|
|
|
ChainIdFixEpoch: big.NewInt(0), |
|
|
|
|
SlotsLimitedEpoch: EpochTBD, // epoch to enable HIP-16
|
|
|
|
|
CrossShardXferPrecompileEpoch: big.NewInt(1), |
|
|
|
|
AllowlistEpoch: EpochTBD, |
|
|
|
|
LeaderRotationInternalValidatorsEpoch: EpochTBD, |
|
|
|
|
LeaderRotationExternalValidatorsEpoch: EpochTBD, |
|
|
|
|
FeeCollectEpoch: EpochTBD, |
|
|
|
|
ValidatorCodeFixEpoch: EpochTBD, |
|
|
|
|
HIP30Epoch: EpochTBD, |
|
|
|
|
NoNilDelegationsEpoch: EpochTBD, |
|
|
|
|
BlockGas30MEpoch: big.NewInt(0), |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// PartnerChainConfig contains the chain parameters for the Partner network.
|
|
|
|
|
// This is the Devnet config
|
|
|
|
|
PartnerChainConfig = &ChainConfig{ |
|
|
|
|
ChainID: PartnerChainID, |
|
|
|
|
EthCompatibleChainID: EthPartnerShard0ChainID, |
|
|
|
|
EthCompatibleShard0ChainID: EthPartnerShard0ChainID, |
|
|
|
|
EthCompatibleEpoch: big.NewInt(0), |
|
|
|
|
CrossTxEpoch: big.NewInt(0), |
|
|
|
|
CrossLinkEpoch: big.NewInt(2), |
|
|
|
|
AggregatedRewardEpoch: big.NewInt(3), |
|
|
|
|
StakingEpoch: big.NewInt(2), |
|
|
|
|
PreStakingEpoch: big.NewInt(1), |
|
|
|
|
QuickUnlockEpoch: big.NewInt(0), |
|
|
|
|
FiveSecondsEpoch: big.NewInt(0), |
|
|
|
|
TwoSecondsEpoch: big.NewInt(0), |
|
|
|
|
SixtyPercentEpoch: EpochTBD, |
|
|
|
|
RedelegationEpoch: big.NewInt(0), |
|
|
|
|
NoEarlyUnlockEpoch: big.NewInt(0), |
|
|
|
|
VRFEpoch: big.NewInt(0), |
|
|
|
|
PrevVRFEpoch: big.NewInt(0), |
|
|
|
|
MinDelegation100Epoch: big.NewInt(0), |
|
|
|
|
MinCommissionRateEpoch: big.NewInt(0), |
|
|
|
|
MinCommissionPromoPeriod: big.NewInt(10), |
|
|
|
|
EPoSBound35Epoch: big.NewInt(0), |
|
|
|
|
EIP155Epoch: big.NewInt(0), |
|
|
|
|
S3Epoch: big.NewInt(0), |
|
|
|
|
DataCopyFixEpoch: big.NewInt(0), |
|
|
|
|
IstanbulEpoch: big.NewInt(0), |
|
|
|
|
ReceiptLogEpoch: big.NewInt(0), |
|
|
|
|
SHA3Epoch: big.NewInt(0), |
|
|
|
|
HIP6And8Epoch: big.NewInt(0), |
|
|
|
|
StakingPrecompileEpoch: big.NewInt(5), |
|
|
|
|
ChainIdFixEpoch: big.NewInt(5), |
|
|
|
|
SlotsLimitedEpoch: EpochTBD, // epoch to enable HIP-16
|
|
|
|
|
CrossShardXferPrecompileEpoch: big.NewInt(5), |
|
|
|
|
AllowlistEpoch: EpochTBD, |
|
|
|
|
LeaderRotationInternalValidatorsEpoch: EpochTBD, |
|
|
|
|
LeaderRotationExternalValidatorsEpoch: EpochTBD, |
|
|
|
|
FeeCollectEpoch: big.NewInt(5), |
|
|
|
|
ValidatorCodeFixEpoch: big.NewInt(5), |
|
|
|
|
HIP30Epoch: big.NewInt(7), |
|
|
|
|
BlockGas30MEpoch: big.NewInt(7), |
|
|
|
|
NoNilDelegationsEpoch: EpochTBD, |
|
|
|
|
ChainID: PartnerChainID, |
|
|
|
|
EthCompatibleChainID: EthPartnerShard0ChainID, |
|
|
|
|
EthCompatibleShard0ChainID: EthPartnerShard0ChainID, |
|
|
|
|
EthCompatibleEpoch: big.NewInt(0), |
|
|
|
|
CrossTxEpoch: big.NewInt(0), |
|
|
|
|
CrossLinkEpoch: big.NewInt(2), |
|
|
|
|
AggregatedRewardEpoch: big.NewInt(3), |
|
|
|
|
StakingEpoch: big.NewInt(2), |
|
|
|
|
PreStakingEpoch: big.NewInt(1), |
|
|
|
|
QuickUnlockEpoch: big.NewInt(0), |
|
|
|
|
FiveSecondsEpoch: big.NewInt(0), |
|
|
|
|
TwoSecondsEpoch: big.NewInt(0), |
|
|
|
|
SixtyPercentEpoch: EpochTBD, |
|
|
|
|
RedelegationEpoch: big.NewInt(0), |
|
|
|
|
NoEarlyUnlockEpoch: big.NewInt(0), |
|
|
|
|
VRFEpoch: big.NewInt(0), |
|
|
|
|
PrevVRFEpoch: big.NewInt(0), |
|
|
|
|
MinDelegation100Epoch: big.NewInt(0), |
|
|
|
|
MinCommissionRateEpoch: big.NewInt(0), |
|
|
|
|
MinCommissionPromoPeriod: big.NewInt(10), |
|
|
|
|
EPoSBound35Epoch: big.NewInt(0), |
|
|
|
|
EIP155Epoch: big.NewInt(0), |
|
|
|
|
S3Epoch: big.NewInt(0), |
|
|
|
|
DataCopyFixEpoch: big.NewInt(0), |
|
|
|
|
IstanbulEpoch: big.NewInt(0), |
|
|
|
|
ReceiptLogEpoch: big.NewInt(0), |
|
|
|
|
SHA3Epoch: big.NewInt(0), |
|
|
|
|
HIP6And8Epoch: big.NewInt(0), |
|
|
|
|
StakingPrecompileEpoch: big.NewInt(5), |
|
|
|
|
ChainIdFixEpoch: big.NewInt(5), |
|
|
|
|
SlotsLimitedEpoch: EpochTBD, // epoch to enable HIP-16
|
|
|
|
|
CrossShardXferPrecompileEpoch: big.NewInt(5), |
|
|
|
|
AllowlistEpoch: EpochTBD, |
|
|
|
|
LeaderRotationInternalValidatorsEpoch: EpochTBD, |
|
|
|
|
LeaderRotationExternalValidatorsEpoch: EpochTBD, |
|
|
|
|
FeeCollectEpoch: big.NewInt(5), |
|
|
|
|
ValidatorCodeFixEpoch: big.NewInt(5), |
|
|
|
|
HIP30Epoch: big.NewInt(7), |
|
|
|
|
BlockGas30MEpoch: big.NewInt(7), |
|
|
|
|
NoNilDelegationsEpoch: EpochTBD, |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// StressnetChainConfig contains the chain parameters for the Stress test network.
|
|
|
|
|
// All features except for CrossLink are enabled at launch.
|
|
|
|
|
StressnetChainConfig = &ChainConfig{ |
|
|
|
|
ChainID: StressnetChainID, |
|
|
|
|
EthCompatibleChainID: EthStressnetShard0ChainID, |
|
|
|
|
EthCompatibleShard0ChainID: EthStressnetShard0ChainID, |
|
|
|
|
EthCompatibleEpoch: big.NewInt(0), |
|
|
|
|
CrossTxEpoch: big.NewInt(0), |
|
|
|
|
CrossLinkEpoch: big.NewInt(2), |
|
|
|
|
AggregatedRewardEpoch: big.NewInt(3), |
|
|
|
|
StakingEpoch: big.NewInt(2), |
|
|
|
|
PreStakingEpoch: big.NewInt(1), |
|
|
|
|
QuickUnlockEpoch: big.NewInt(0), |
|
|
|
|
FiveSecondsEpoch: big.NewInt(0), |
|
|
|
|
TwoSecondsEpoch: big.NewInt(0), |
|
|
|
|
SixtyPercentEpoch: big.NewInt(10), |
|
|
|
|
RedelegationEpoch: big.NewInt(0), |
|
|
|
|
NoEarlyUnlockEpoch: big.NewInt(0), |
|
|
|
|
VRFEpoch: big.NewInt(0), |
|
|
|
|
PrevVRFEpoch: big.NewInt(0), |
|
|
|
|
MinDelegation100Epoch: big.NewInt(0), |
|
|
|
|
MinCommissionRateEpoch: big.NewInt(0), |
|
|
|
|
MinCommissionPromoPeriod: big.NewInt(10), |
|
|
|
|
EPoSBound35Epoch: big.NewInt(0), |
|
|
|
|
EIP155Epoch: big.NewInt(0), |
|
|
|
|
S3Epoch: big.NewInt(0), |
|
|
|
|
DataCopyFixEpoch: big.NewInt(0), |
|
|
|
|
IstanbulEpoch: big.NewInt(0), |
|
|
|
|
ReceiptLogEpoch: big.NewInt(0), |
|
|
|
|
SHA3Epoch: big.NewInt(0), |
|
|
|
|
HIP6And8Epoch: big.NewInt(0), |
|
|
|
|
StakingPrecompileEpoch: big.NewInt(2), |
|
|
|
|
ChainIdFixEpoch: big.NewInt(0), |
|
|
|
|
SlotsLimitedEpoch: EpochTBD, // epoch to enable HIP-16
|
|
|
|
|
CrossShardXferPrecompileEpoch: big.NewInt(1), |
|
|
|
|
AllowlistEpoch: EpochTBD, |
|
|
|
|
FeeCollectEpoch: EpochTBD, |
|
|
|
|
ChainID: StressnetChainID, |
|
|
|
|
EthCompatibleChainID: EthStressnetShard0ChainID, |
|
|
|
|
EthCompatibleShard0ChainID: EthStressnetShard0ChainID, |
|
|
|
|
EthCompatibleEpoch: big.NewInt(0), |
|
|
|
|
CrossTxEpoch: big.NewInt(0), |
|
|
|
|
CrossLinkEpoch: big.NewInt(2), |
|
|
|
|
AggregatedRewardEpoch: big.NewInt(3), |
|
|
|
|
StakingEpoch: big.NewInt(2), |
|
|
|
|
PreStakingEpoch: big.NewInt(1), |
|
|
|
|
QuickUnlockEpoch: big.NewInt(0), |
|
|
|
|
FiveSecondsEpoch: big.NewInt(0), |
|
|
|
|
TwoSecondsEpoch: big.NewInt(0), |
|
|
|
|
SixtyPercentEpoch: big.NewInt(10), |
|
|
|
|
RedelegationEpoch: big.NewInt(0), |
|
|
|
|
NoEarlyUnlockEpoch: big.NewInt(0), |
|
|
|
|
VRFEpoch: big.NewInt(0), |
|
|
|
|
PrevVRFEpoch: big.NewInt(0), |
|
|
|
|
MinDelegation100Epoch: big.NewInt(0), |
|
|
|
|
MinCommissionRateEpoch: big.NewInt(0), |
|
|
|
|
MinCommissionPromoPeriod: big.NewInt(10), |
|
|
|
|
EPoSBound35Epoch: big.NewInt(0), |
|
|
|
|
EIP155Epoch: big.NewInt(0), |
|
|
|
|
S3Epoch: big.NewInt(0), |
|
|
|
|
DataCopyFixEpoch: big.NewInt(0), |
|
|
|
|
IstanbulEpoch: big.NewInt(0), |
|
|
|
|
ReceiptLogEpoch: big.NewInt(0), |
|
|
|
|
SHA3Epoch: big.NewInt(0), |
|
|
|
|
HIP6And8Epoch: big.NewInt(0), |
|
|
|
|
StakingPrecompileEpoch: big.NewInt(2), |
|
|
|
|
ChainIdFixEpoch: big.NewInt(0), |
|
|
|
|
SlotsLimitedEpoch: EpochTBD, // epoch to enable HIP-16
|
|
|
|
|
CrossShardXferPrecompileEpoch: big.NewInt(1), |
|
|
|
|
AllowlistEpoch: EpochTBD, |
|
|
|
|
FeeCollectEpoch: EpochTBD, |
|
|
|
|
LeaderRotationInternalValidatorsEpoch: EpochTBD, |
|
|
|
|
LeaderRotationExternalValidatorsEpoch: EpochTBD, |
|
|
|
|
ValidatorCodeFixEpoch: EpochTBD, |
|
|
|
|
HIP30Epoch: EpochTBD, |
|
|
|
|
NoNilDelegationsEpoch: big.NewInt(2), |
|
|
|
|
BlockGas30MEpoch: big.NewInt(0), |
|
|
|
|
ValidatorCodeFixEpoch: EpochTBD, |
|
|
|
|
HIP30Epoch: EpochTBD, |
|
|
|
|
NoNilDelegationsEpoch: big.NewInt(2), |
|
|
|
|
BlockGas30MEpoch: big.NewInt(0), |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// LocalnetChainConfig contains the chain parameters to run for local development.
|
|
|
|
|
LocalnetChainConfig = &ChainConfig{ |
|
|
|
|
ChainID: TestnetChainID, |
|
|
|
|
EthCompatibleChainID: EthTestnetShard0ChainID, |
|
|
|
|
EthCompatibleShard0ChainID: EthTestnetShard0ChainID, |
|
|
|
|
EthCompatibleEpoch: big.NewInt(0), |
|
|
|
|
CrossTxEpoch: big.NewInt(0), |
|
|
|
|
CrossLinkEpoch: big.NewInt(2), |
|
|
|
|
AggregatedRewardEpoch: big.NewInt(3), |
|
|
|
|
StakingEpoch: big.NewInt(2), |
|
|
|
|
PreStakingEpoch: big.NewInt(0), |
|
|
|
|
QuickUnlockEpoch: big.NewInt(0), |
|
|
|
|
FiveSecondsEpoch: big.NewInt(0), |
|
|
|
|
TwoSecondsEpoch: big.NewInt(0), |
|
|
|
|
SixtyPercentEpoch: EpochTBD, // Never enable it for localnet as localnet has no external validator setup
|
|
|
|
|
RedelegationEpoch: big.NewInt(0), |
|
|
|
|
NoEarlyUnlockEpoch: big.NewInt(0), |
|
|
|
|
VRFEpoch: big.NewInt(0), |
|
|
|
|
PrevVRFEpoch: big.NewInt(0), |
|
|
|
|
MinDelegation100Epoch: big.NewInt(0), |
|
|
|
|
MinCommissionRateEpoch: big.NewInt(0), |
|
|
|
|
MinCommissionPromoPeriod: big.NewInt(10), |
|
|
|
|
EPoSBound35Epoch: big.NewInt(0), |
|
|
|
|
EIP155Epoch: big.NewInt(0), |
|
|
|
|
S3Epoch: big.NewInt(0), |
|
|
|
|
DataCopyFixEpoch: big.NewInt(0), |
|
|
|
|
IstanbulEpoch: big.NewInt(0), |
|
|
|
|
ReceiptLogEpoch: big.NewInt(0), |
|
|
|
|
SHA3Epoch: big.NewInt(0), |
|
|
|
|
HIP6And8Epoch: EpochTBD, // Never enable it for localnet as localnet has no external validator setup
|
|
|
|
|
StakingPrecompileEpoch: big.NewInt(2), |
|
|
|
|
ChainIdFixEpoch: big.NewInt(0), |
|
|
|
|
SlotsLimitedEpoch: EpochTBD, // epoch to enable HIP-16
|
|
|
|
|
CrossShardXferPrecompileEpoch: big.NewInt(1), |
|
|
|
|
AllowlistEpoch: EpochTBD, |
|
|
|
|
LeaderRotationInternalValidatorsEpoch: big.NewInt(5), |
|
|
|
|
LeaderRotationExternalValidatorsEpoch: big.NewInt(6), |
|
|
|
|
FeeCollectEpoch: big.NewInt(2), |
|
|
|
|
ValidatorCodeFixEpoch: big.NewInt(2), |
|
|
|
|
HIP30Epoch: EpochTBD, |
|
|
|
|
NoNilDelegationsEpoch: big.NewInt(2), |
|
|
|
|
BlockGas30MEpoch: big.NewInt(0), |
|
|
|
|
ChainID: TestnetChainID, |
|
|
|
|
EthCompatibleChainID: EthTestnetShard0ChainID, |
|
|
|
|
EthCompatibleShard0ChainID: EthTestnetShard0ChainID, |
|
|
|
|
EthCompatibleEpoch: big.NewInt(0), |
|
|
|
|
CrossTxEpoch: big.NewInt(0), |
|
|
|
|
CrossLinkEpoch: big.NewInt(2), |
|
|
|
|
AggregatedRewardEpoch: big.NewInt(3), |
|
|
|
|
StakingEpoch: big.NewInt(2), |
|
|
|
|
PreStakingEpoch: big.NewInt(0), |
|
|
|
|
QuickUnlockEpoch: big.NewInt(0), |
|
|
|
|
FiveSecondsEpoch: big.NewInt(0), |
|
|
|
|
TwoSecondsEpoch: big.NewInt(0), |
|
|
|
|
SixtyPercentEpoch: EpochTBD, // Never enable it for localnet as localnet has no external validator setup
|
|
|
|
|
RedelegationEpoch: big.NewInt(0), |
|
|
|
|
NoEarlyUnlockEpoch: big.NewInt(0), |
|
|
|
|
VRFEpoch: big.NewInt(0), |
|
|
|
|
PrevVRFEpoch: big.NewInt(0), |
|
|
|
|
MinDelegation100Epoch: big.NewInt(0), |
|
|
|
|
MinCommissionRateEpoch: big.NewInt(0), |
|
|
|
|
MinCommissionPromoPeriod: big.NewInt(10), |
|
|
|
|
EPoSBound35Epoch: big.NewInt(0), |
|
|
|
|
EIP155Epoch: big.NewInt(0), |
|
|
|
|
S3Epoch: big.NewInt(0), |
|
|
|
|
DataCopyFixEpoch: big.NewInt(0), |
|
|
|
|
IstanbulEpoch: big.NewInt(0), |
|
|
|
|
ReceiptLogEpoch: big.NewInt(0), |
|
|
|
|
SHA3Epoch: big.NewInt(0), |
|
|
|
|
HIP6And8Epoch: EpochTBD, // Never enable it for localnet as localnet has no external validator setup
|
|
|
|
|
StakingPrecompileEpoch: big.NewInt(2), |
|
|
|
|
ChainIdFixEpoch: big.NewInt(0), |
|
|
|
|
SlotsLimitedEpoch: EpochTBD, // epoch to enable HIP-16
|
|
|
|
|
CrossShardXferPrecompileEpoch: big.NewInt(1), |
|
|
|
|
AllowlistEpoch: EpochTBD, |
|
|
|
|
LeaderRotationInternalValidatorsEpoch: big.NewInt(5), |
|
|
|
|
LeaderRotationExternalValidatorsEpoch: big.NewInt(6), |
|
|
|
|
FeeCollectEpoch: big.NewInt(2), |
|
|
|
|
ValidatorCodeFixEpoch: big.NewInt(2), |
|
|
|
|
HIP30Epoch: EpochTBD, |
|
|
|
|
NoNilDelegationsEpoch: big.NewInt(2), |
|
|
|
|
BlockGas30MEpoch: big.NewInt(0), |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// AllProtocolChanges ...
|
|
|
|
@ -793,7 +793,6 @@ func (c *ChainConfig) IsNoNilDelegations(epoch *big.Int) bool { |
|
|
|
|
return isForked(c.NoNilDelegationsEpoch, epoch) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// IsCrossShardXferPrecompile determines whether the
|
|
|
|
|
// Cross Shard Transfer Precompile is available in the EVM
|
|
|
|
|
func (c *ChainConfig) IsCrossShardXferPrecompile(epoch *big.Int) bool { |
|
|
|
|