|
|
@ -52,6 +52,8 @@ var ( |
|
|
|
NoEarlyUnlockEpoch: big.NewInt(530), // Around Monday Apr 12th 2021, 22:30 UTC
|
|
|
|
NoEarlyUnlockEpoch: big.NewInt(530), // Around Monday Apr 12th 2021, 22:30 UTC
|
|
|
|
VRFEpoch: EpochTBD, |
|
|
|
VRFEpoch: EpochTBD, |
|
|
|
MinDelegation100Epoch: EpochTBD, |
|
|
|
MinDelegation100Epoch: EpochTBD, |
|
|
|
|
|
|
|
MinCommissionRateEpoch: EpochTBD, |
|
|
|
|
|
|
|
MinCommissionPromoPeriod: big.NewInt(100), |
|
|
|
EPoSBound35Epoch: EpochTBD, |
|
|
|
EPoSBound35Epoch: EpochTBD, |
|
|
|
EIP155Epoch: big.NewInt(28), |
|
|
|
EIP155Epoch: big.NewInt(28), |
|
|
|
S3Epoch: big.NewInt(28), |
|
|
|
S3Epoch: big.NewInt(28), |
|
|
@ -77,6 +79,8 @@ var ( |
|
|
|
NoEarlyUnlockEpoch: big.NewInt(73580), |
|
|
|
NoEarlyUnlockEpoch: big.NewInt(73580), |
|
|
|
VRFEpoch: EpochTBD, |
|
|
|
VRFEpoch: EpochTBD, |
|
|
|
MinDelegation100Epoch: EpochTBD, |
|
|
|
MinDelegation100Epoch: EpochTBD, |
|
|
|
|
|
|
|
MinCommissionRateEpoch: EpochTBD, |
|
|
|
|
|
|
|
MinCommissionPromoPeriod: big.NewInt(10), |
|
|
|
EPoSBound35Epoch: EpochTBD, |
|
|
|
EPoSBound35Epoch: EpochTBD, |
|
|
|
EIP155Epoch: big.NewInt(0), |
|
|
|
EIP155Epoch: big.NewInt(0), |
|
|
|
S3Epoch: big.NewInt(0), |
|
|
|
S3Epoch: big.NewInt(0), |
|
|
@ -103,6 +107,8 @@ var ( |
|
|
|
NoEarlyUnlockEpoch: big.NewInt(0), |
|
|
|
NoEarlyUnlockEpoch: big.NewInt(0), |
|
|
|
VRFEpoch: big.NewInt(0), |
|
|
|
VRFEpoch: big.NewInt(0), |
|
|
|
MinDelegation100Epoch: big.NewInt(0), |
|
|
|
MinDelegation100Epoch: big.NewInt(0), |
|
|
|
|
|
|
|
MinCommissionRateEpoch: big.NewInt(0), |
|
|
|
|
|
|
|
MinCommissionPromoPeriod: big.NewInt(10), |
|
|
|
EPoSBound35Epoch: big.NewInt(0), |
|
|
|
EPoSBound35Epoch: big.NewInt(0), |
|
|
|
EIP155Epoch: big.NewInt(0), |
|
|
|
EIP155Epoch: big.NewInt(0), |
|
|
|
S3Epoch: big.NewInt(0), |
|
|
|
S3Epoch: big.NewInt(0), |
|
|
@ -129,6 +135,8 @@ var ( |
|
|
|
NoEarlyUnlockEpoch: big.NewInt(0), |
|
|
|
NoEarlyUnlockEpoch: big.NewInt(0), |
|
|
|
VRFEpoch: big.NewInt(0), |
|
|
|
VRFEpoch: big.NewInt(0), |
|
|
|
MinDelegation100Epoch: big.NewInt(0), |
|
|
|
MinDelegation100Epoch: big.NewInt(0), |
|
|
|
|
|
|
|
MinCommissionRateEpoch: big.NewInt(0), |
|
|
|
|
|
|
|
MinCommissionPromoPeriod: big.NewInt(10), |
|
|
|
EPoSBound35Epoch: big.NewInt(0), |
|
|
|
EPoSBound35Epoch: big.NewInt(0), |
|
|
|
EIP155Epoch: big.NewInt(0), |
|
|
|
EIP155Epoch: big.NewInt(0), |
|
|
|
S3Epoch: big.NewInt(0), |
|
|
|
S3Epoch: big.NewInt(0), |
|
|
@ -155,6 +163,8 @@ var ( |
|
|
|
NoEarlyUnlockEpoch: big.NewInt(0), |
|
|
|
NoEarlyUnlockEpoch: big.NewInt(0), |
|
|
|
VRFEpoch: big.NewInt(0), |
|
|
|
VRFEpoch: big.NewInt(0), |
|
|
|
MinDelegation100Epoch: big.NewInt(0), |
|
|
|
MinDelegation100Epoch: big.NewInt(0), |
|
|
|
|
|
|
|
MinCommissionRateEpoch: big.NewInt(0), |
|
|
|
|
|
|
|
MinCommissionPromoPeriod: big.NewInt(10), |
|
|
|
EPoSBound35Epoch: big.NewInt(0), |
|
|
|
EPoSBound35Epoch: big.NewInt(0), |
|
|
|
EIP155Epoch: big.NewInt(0), |
|
|
|
EIP155Epoch: big.NewInt(0), |
|
|
|
S3Epoch: big.NewInt(0), |
|
|
|
S3Epoch: big.NewInt(0), |
|
|
@ -180,6 +190,8 @@ var ( |
|
|
|
NoEarlyUnlockEpoch: big.NewInt(0), |
|
|
|
NoEarlyUnlockEpoch: big.NewInt(0), |
|
|
|
VRFEpoch: big.NewInt(0), |
|
|
|
VRFEpoch: big.NewInt(0), |
|
|
|
MinDelegation100Epoch: big.NewInt(0), |
|
|
|
MinDelegation100Epoch: big.NewInt(0), |
|
|
|
|
|
|
|
MinCommissionRateEpoch: big.NewInt(0), |
|
|
|
|
|
|
|
MinCommissionPromoPeriod: big.NewInt(10), |
|
|
|
EPoSBound35Epoch: big.NewInt(0), |
|
|
|
EPoSBound35Epoch: big.NewInt(0), |
|
|
|
EIP155Epoch: big.NewInt(0), |
|
|
|
EIP155Epoch: big.NewInt(0), |
|
|
|
S3Epoch: big.NewInt(0), |
|
|
|
S3Epoch: big.NewInt(0), |
|
|
@ -207,6 +219,8 @@ var ( |
|
|
|
big.NewInt(0), // NoEarlyUnlockEpoch
|
|
|
|
big.NewInt(0), // NoEarlyUnlockEpoch
|
|
|
|
big.NewInt(0), // VRFEpoch
|
|
|
|
big.NewInt(0), // VRFEpoch
|
|
|
|
big.NewInt(0), // MinDelegation100Epoch
|
|
|
|
big.NewInt(0), // MinDelegation100Epoch
|
|
|
|
|
|
|
|
big.NewInt(0), // MinCommissionRateEpoch
|
|
|
|
|
|
|
|
big.NewInt(10), // MinCommissionPromoPeriod
|
|
|
|
big.NewInt(0), // EPoSBound35Epoch
|
|
|
|
big.NewInt(0), // EPoSBound35Epoch
|
|
|
|
big.NewInt(0), // EIP155Epoch
|
|
|
|
big.NewInt(0), // EIP155Epoch
|
|
|
|
big.NewInt(0), // S3Epoch
|
|
|
|
big.NewInt(0), // S3Epoch
|
|
|
@ -234,6 +248,8 @@ var ( |
|
|
|
big.NewInt(0), // NoEarlyUnlockEpoch
|
|
|
|
big.NewInt(0), // NoEarlyUnlockEpoch
|
|
|
|
big.NewInt(0), // VRFEpoch
|
|
|
|
big.NewInt(0), // VRFEpoch
|
|
|
|
big.NewInt(0), // MinDelegation100Epoch
|
|
|
|
big.NewInt(0), // MinDelegation100Epoch
|
|
|
|
|
|
|
|
big.NewInt(0), // MinCommissionRateEpoch
|
|
|
|
|
|
|
|
big.NewInt(10), // MinCommissionPromoPeriod
|
|
|
|
big.NewInt(0), // EPoSBound35Epoch
|
|
|
|
big.NewInt(0), // EPoSBound35Epoch
|
|
|
|
big.NewInt(0), // EIP155Epoch
|
|
|
|
big.NewInt(0), // EIP155Epoch
|
|
|
|
big.NewInt(0), // S3Epoch
|
|
|
|
big.NewInt(0), // S3Epoch
|
|
|
@ -318,6 +334,12 @@ type ChainConfig struct { |
|
|
|
// MinDelegation100Epoch is the epoch when min delegation is reduced from 1000 ONE to 100 ONE
|
|
|
|
// MinDelegation100Epoch is the epoch when min delegation is reduced from 1000 ONE to 100 ONE
|
|
|
|
MinDelegation100Epoch *big.Int `json:"min-delegation-100-epoch,omitempty"` |
|
|
|
MinDelegation100Epoch *big.Int `json:"min-delegation-100-epoch,omitempty"` |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// MinCommissionRateEpoch is the epoch when policy for minimum comission rate of 5% is started
|
|
|
|
|
|
|
|
MinCommissionRateEpoch *big.Int `json:"min-commission-rate-epoch,omitempty"` |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// MinCommissionPromoPeriod is the number of epochs when newly elected validators can have 0% commission
|
|
|
|
|
|
|
|
MinCommissionPromoPeriod *big.Int `json:"commission-promo-period,omitempty"` |
|
|
|
|
|
|
|
|
|
|
|
// EPoSBound35Epoch is the epoch when the EPoS bound parameter c is changed from 15% to 35%
|
|
|
|
// EPoSBound35Epoch is the epoch when the EPoS bound parameter c is changed from 15% to 35%
|
|
|
|
EPoSBound35Epoch *big.Int `json:"epos-bound-35-epoch,omitempty"` |
|
|
|
EPoSBound35Epoch *big.Int `json:"epos-bound-35-epoch,omitempty"` |
|
|
|
|
|
|
|
|
|
|
@ -417,6 +439,11 @@ func (c *ChainConfig) IsMinDelegation100(epoch *big.Int) bool { |
|
|
|
return isForked(c.MinDelegation100Epoch, epoch) |
|
|
|
return isForked(c.MinDelegation100Epoch, epoch) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// IsMinCommissionRate determines whether it is the epoch to start the policy of 5% min commission
|
|
|
|
|
|
|
|
func (c *ChainConfig) IsMinCommissionRate(epoch *big.Int) bool { |
|
|
|
|
|
|
|
return isForked(c.MinCommissionRateEpoch, epoch) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// IsEPoSBound35 determines whether it is the epoch to extend the EPoS bound to 35%
|
|
|
|
// IsEPoSBound35 determines whether it is the epoch to extend the EPoS bound to 35%
|
|
|
|
func (c *ChainConfig) IsEPoSBound35(epoch *big.Int) bool { |
|
|
|
func (c *ChainConfig) IsEPoSBound35(epoch *big.Int) bool { |
|
|
|
return isForked(c.EPoSBound35Epoch, epoch) |
|
|
|
return isForked(c.EPoSBound35Epoch, epoch) |
|
|
|