@ -70,8 +70,8 @@ var (
CrossShardXferPrecompileEpoch : big . NewInt ( 1323 ) , // Around Wed 8 Feb 11:30PM UTC
AllowlistEpoch : EpochTBD ,
FeeCollectEpoch : EpochTBD ,
LeaderRotationEpoch : EpochTBD ,
LeaderRotationBlocksCount : 64 ,
LeaderRotationExternalNonBeaconLeaders : EpochTBD ,
LeaderRotationExternalBeaconLeaders : EpochTBD ,
ValidatorCodeFixEpoch : EpochTBD ,
}
@ -110,8 +110,8 @@ var (
ChainIdFixEpoch : big . NewInt ( 0 ) ,
CrossShardXferPrecompileEpoch : big . NewInt ( 2 ) ,
AllowlistEpoch : big . NewInt ( 2 ) ,
LeaderRotationEpoch : EpochTBD ,
LeaderRotationBlocksCount : 64 ,
LeaderRotationExternalNonBeaconLeaders : EpochTBD ,
LeaderRotationExternalBeaconLeaders : EpochTBD ,
FeeCollectEpoch : EpochTBD ,
ValidatorCodeFixEpoch : EpochTBD ,
}
@ -151,8 +151,8 @@ var (
SlotsLimitedEpoch : EpochTBD , // epoch to enable HIP-16
CrossShardXferPrecompileEpoch : big . NewInt ( 1 ) ,
AllowlistEpoch : EpochTBD ,
LeaderRotationEpoch : EpochTBD ,
LeaderRotationBlocksCount : 64 ,
LeaderRotationExternalNonBeaconLeaders : EpochTBD ,
LeaderRotationExternalBeaconLeaders : EpochTBD ,
FeeCollectEpoch : EpochTBD ,
ValidatorCodeFixEpoch : EpochTBD ,
}
@ -194,8 +194,8 @@ var (
CrossShardXferPrecompileEpoch : big . NewInt ( 1 ) ,
AllowlistEpoch : EpochTBD ,
FeeCollectEpoch : big . NewInt ( 574 ) ,
LeaderRotationEpoch : EpochTBD ,
LeaderRotationBlocksCount : 64 ,
LeaderRotationExternalNonBeaconLeaders : EpochTBD ,
LeaderRotationExternalBeaconLeaders : EpochTBD ,
ValidatorCodeFixEpoch : EpochTBD ,
}
@ -236,8 +236,8 @@ var (
CrossShardXferPrecompileEpoch : big . NewInt ( 1 ) ,
AllowlistEpoch : EpochTBD ,
FeeCollectEpoch : EpochTBD ,
LeaderRotationEpoch : EpochTBD ,
LeaderRotationBlocksCount : 64 ,
LeaderRotationExternalNonBeaconLeaders : EpochTBD ,
LeaderRotationExternalBeaconLeaders : EpochTBD ,
ValidatorCodeFixEpoch : EpochTBD ,
}
@ -276,8 +276,8 @@ var (
SlotsLimitedEpoch : EpochTBD , // epoch to enable HIP-16
CrossShardXferPrecompileEpoch : big . NewInt ( 1 ) ,
AllowlistEpoch : EpochTBD ,
LeaderRotationEpoch : EpochTBD ,
LeaderRotationBlocksCount : 5 ,
LeaderRotationExternalNonBeaconLeaders : big . NewInt ( 5 ) ,
LeaderRotationExternalBeaconLeaders : big . NewInt ( 6 ) ,
FeeCollectEpoch : big . NewInt ( 5 ) ,
ValidatorCodeFixEpoch : EpochTBD ,
}
@ -319,8 +319,8 @@ var (
big . NewInt ( 0 ) , // SlotsLimitedEpoch
big . NewInt ( 1 ) , // CrossShardXferPrecompileEpoch
big . NewInt ( 0 ) , // AllowlistEpoch
big . NewInt ( 1 ) , // LeaderRotationEpoch
64 , // LeaderRotationBlocksCount
big . NewInt ( 1 ) , // LeaderRotationExternalNonBeaconLeaders
big . NewInt ( 1 ) , // LeaderRotationExternalBeaconLeaders
big . NewInt ( 0 ) , // FeeCollectEpoch
big . NewInt ( 0 ) , // ValidatorCodeFixEpoch
}
@ -362,8 +362,8 @@ var (
big . NewInt ( 0 ) , // SlotsLimitedEpoch
big . NewInt ( 1 ) , // CrossShardXferPrecompileEpoch
big . NewInt ( 0 ) , // AllowlistEpoch
big . NewInt ( 1 ) , // LeaderRotationEpoch
64 , // LeaderRotationBlocksCount
big . NewInt ( 1 ) , // LeaderRotationExternalNonBeaconLeaders
big . NewInt ( 1 ) , // LeaderRotationExternalBeaconLeaders
big . NewInt ( 0 ) , // FeeCollectEpoch
big . NewInt ( 0 ) , // ValidatorCodeFixEpoch
}
@ -505,9 +505,9 @@ type ChainConfig struct {
// AllowlistEpoch is the first epoch to support allowlist of HIP18
AllowlistEpoch * big . Int
LeaderRotationEpoch * big . Int ` json:"leader-rotation-epoch ,omitempty" `
LeaderRotationExternalNonBeaconLeaders * big . Int ` json:"leader-rotation-external-non-beacon-leaders ,omitempty" `
LeaderRotationBlocksCount int ` json:"leader-rotation-blocks-count ,omitempty" `
LeaderRotationExternalBeaconLeaders * big . Int ` json:"leader-rotation-external-beacon-leaders ,omitempty" `
// FeeCollectEpoch is the first epoch that enables txn fees to be collected into the community-managed account.
// It should >= StakingEpoch.
@ -725,7 +725,17 @@ func (c *ChainConfig) IsAllowlistEpoch(epoch *big.Int) bool {
}
func ( c * ChainConfig ) IsLeaderRotation ( epoch * big . Int ) bool {
return isForked ( c . LeaderRotationEpoch , epoch )
return isForked ( c . LeaderRotationExternalNonBeaconLeaders , epoch )
}
func ( c * ChainConfig ) IsLeaderRotationExternalValidatorsAllowed ( epoch * big . Int , shardID uint32 ) bool {
if ! c . IsLeaderRotation ( epoch ) {
return false
}
if shardID == 0 {
return isForked ( c . LeaderRotationExternalBeaconLeaders , epoch )
}
return true
}
// IsFeeCollectEpoch determines whether Txn Fees will be collected into the community-managed account.