@ -70,8 +70,8 @@ var (
CrossShardXferPrecompileEpoch : big . NewInt ( 1323 ) , // Around Wed 8 Feb 11:30PM UTC
CrossShardXferPrecompileEpoch : big . NewInt ( 1323 ) , // Around Wed 8 Feb 11:30PM UTC
AllowlistEpoch : EpochTBD ,
AllowlistEpoch : EpochTBD ,
FeeCollectEpoch : EpochTBD ,
FeeCollectEpoch : EpochTBD ,
LeaderRotationEpoch : EpochTBD ,
LeaderRotationExternalNonBeaconLeaders : EpochTBD ,
LeaderRotationBlocksCount : 64 ,
LeaderRotationExternalBeaconLeaders : EpochTBD ,
ValidatorCodeFixEpoch : EpochTBD ,
ValidatorCodeFixEpoch : EpochTBD ,
}
}
@ -110,8 +110,8 @@ var (
ChainIdFixEpoch : big . NewInt ( 0 ) ,
ChainIdFixEpoch : big . NewInt ( 0 ) ,
CrossShardXferPrecompileEpoch : big . NewInt ( 2 ) ,
CrossShardXferPrecompileEpoch : big . NewInt ( 2 ) ,
AllowlistEpoch : big . NewInt ( 2 ) ,
AllowlistEpoch : big . NewInt ( 2 ) ,
LeaderRotationEpoch : EpochTBD ,
LeaderRotationExternalNonBeaconLeaders : EpochTBD ,
LeaderRotationBlocksCount : 64 ,
LeaderRotationExternalBeaconLeaders : EpochTBD ,
FeeCollectEpoch : EpochTBD ,
FeeCollectEpoch : EpochTBD ,
ValidatorCodeFixEpoch : EpochTBD ,
ValidatorCodeFixEpoch : EpochTBD ,
}
}
@ -151,8 +151,8 @@ var (
SlotsLimitedEpoch : EpochTBD , // epoch to enable HIP-16
SlotsLimitedEpoch : EpochTBD , // epoch to enable HIP-16
CrossShardXferPrecompileEpoch : big . NewInt ( 1 ) ,
CrossShardXferPrecompileEpoch : big . NewInt ( 1 ) ,
AllowlistEpoch : EpochTBD ,
AllowlistEpoch : EpochTBD ,
LeaderRotationEpoch : EpochTBD ,
LeaderRotationExternalNonBeaconLeaders : EpochTBD ,
LeaderRotationBlocksCount : 64 ,
LeaderRotationExternalBeaconLeaders : EpochTBD ,
FeeCollectEpoch : EpochTBD ,
FeeCollectEpoch : EpochTBD ,
ValidatorCodeFixEpoch : EpochTBD ,
ValidatorCodeFixEpoch : EpochTBD ,
}
}
@ -194,8 +194,8 @@ var (
CrossShardXferPrecompileEpoch : big . NewInt ( 1 ) ,
CrossShardXferPrecompileEpoch : big . NewInt ( 1 ) ,
AllowlistEpoch : EpochTBD ,
AllowlistEpoch : EpochTBD ,
FeeCollectEpoch : big . NewInt ( 574 ) ,
FeeCollectEpoch : big . NewInt ( 574 ) ,
LeaderRotationEpoch : EpochTBD ,
LeaderRotationExternalNonBeaconLeaders : EpochTBD ,
LeaderRotationBlocksCount : 64 ,
LeaderRotationExternalBeaconLeaders : EpochTBD ,
ValidatorCodeFixEpoch : EpochTBD ,
ValidatorCodeFixEpoch : EpochTBD ,
}
}
@ -236,8 +236,8 @@ var (
CrossShardXferPrecompileEpoch : big . NewInt ( 1 ) ,
CrossShardXferPrecompileEpoch : big . NewInt ( 1 ) ,
AllowlistEpoch : EpochTBD ,
AllowlistEpoch : EpochTBD ,
FeeCollectEpoch : EpochTBD ,
FeeCollectEpoch : EpochTBD ,
LeaderRotationEpoch : EpochTBD ,
LeaderRotationExternalNonBeaconLeaders : EpochTBD ,
LeaderRotationBlocksCount : 64 ,
LeaderRotationExternalBeaconLeaders : EpochTBD ,
ValidatorCodeFixEpoch : EpochTBD ,
ValidatorCodeFixEpoch : EpochTBD ,
}
}
@ -276,8 +276,8 @@ var (
SlotsLimitedEpoch : EpochTBD , // epoch to enable HIP-16
SlotsLimitedEpoch : EpochTBD , // epoch to enable HIP-16
CrossShardXferPrecompileEpoch : big . NewInt ( 1 ) ,
CrossShardXferPrecompileEpoch : big . NewInt ( 1 ) ,
AllowlistEpoch : EpochTBD ,
AllowlistEpoch : EpochTBD ,
LeaderRotationEpoch : EpochTBD ,
LeaderRotationExternalNonBeaconLeaders : big . NewInt ( 5 ) ,
LeaderRotationBlocksCount : 5 ,
LeaderRotationExternalBeaconLeaders : big . NewInt ( 6 ) ,
FeeCollectEpoch : big . NewInt ( 5 ) ,
FeeCollectEpoch : big . NewInt ( 5 ) ,
ValidatorCodeFixEpoch : EpochTBD ,
ValidatorCodeFixEpoch : EpochTBD ,
}
}
@ -319,8 +319,8 @@ var (
big . NewInt ( 0 ) , // SlotsLimitedEpoch
big . NewInt ( 0 ) , // SlotsLimitedEpoch
big . NewInt ( 1 ) , // CrossShardXferPrecompileEpoch
big . NewInt ( 1 ) , // CrossShardXferPrecompileEpoch
big . NewInt ( 0 ) , // AllowlistEpoch
big . NewInt ( 0 ) , // AllowlistEpoch
big . NewInt ( 1 ) , // LeaderRotationEpoch
big . NewInt ( 1 ) , // LeaderRotationExternalNonBeaconLeaders
64 , // LeaderRotationBlocksCount
big . NewInt ( 1 ) , // LeaderRotationExternalBeaconLeaders
big . NewInt ( 0 ) , // FeeCollectEpoch
big . NewInt ( 0 ) , // FeeCollectEpoch
big . NewInt ( 0 ) , // ValidatorCodeFixEpoch
big . NewInt ( 0 ) , // ValidatorCodeFixEpoch
}
}
@ -362,8 +362,8 @@ var (
big . NewInt ( 0 ) , // SlotsLimitedEpoch
big . NewInt ( 0 ) , // SlotsLimitedEpoch
big . NewInt ( 1 ) , // CrossShardXferPrecompileEpoch
big . NewInt ( 1 ) , // CrossShardXferPrecompileEpoch
big . NewInt ( 0 ) , // AllowlistEpoch
big . NewInt ( 0 ) , // AllowlistEpoch
big . NewInt ( 1 ) , // LeaderRotationEpoch
big . NewInt ( 1 ) , // LeaderRotationExternalNonBeaconLeaders
64 , // LeaderRotationBlocksCount
big . NewInt ( 1 ) , // LeaderRotationExternalBeaconLeaders
big . NewInt ( 0 ) , // FeeCollectEpoch
big . NewInt ( 0 ) , // FeeCollectEpoch
big . NewInt ( 0 ) , // ValidatorCodeFixEpoch
big . NewInt ( 0 ) , // ValidatorCodeFixEpoch
}
}
@ -505,9 +505,9 @@ type ChainConfig struct {
// AllowlistEpoch is the first epoch to support allowlist of HIP18
// AllowlistEpoch is the first epoch to support allowlist of HIP18
AllowlistEpoch * big . Int
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.
// FeeCollectEpoch is the first epoch that enables txn fees to be collected into the community-managed account.
// It should >= StakingEpoch.
// It should >= StakingEpoch.
@ -725,7 +725,17 @@ func (c *ChainConfig) IsAllowlistEpoch(epoch *big.Int) bool {
}
}
func ( c * ChainConfig ) IsLeaderRotation ( 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.
// IsFeeCollectEpoch determines whether Txn Fees will be collected into the community-managed account.