@ -31,8 +31,7 @@ var (
RopstenGenesisHash = common . HexToHash ( "0x41941023680923e0fe4d74a34bdac8141f2540e3ae90623718e47d66d1ca4a2d" )
RinkebyGenesisHash = common . HexToHash ( "0x6341fd3daf94b748c72ced5a5b26028f2474f5f00d824504e4fa37a75767e177" )
GoerliGenesisHash = common . HexToHash ( "0xbf7e331f7f7c1dd2e05159666b3bf8bc7a8a3a9eb1d518969eab529dd9b88c1a" )
// TODO: update with yolov2 values
YoloV2GenesisHash = common . HexToHash ( "0x498a7239036dd2cd09e2bb8a80922b78632017958c332b42044c250d603a8a3e" )
YoloV3GenesisHash = common . HexToHash ( "0x374f07cc7fa7c251fc5f36849f574b43db43600526410349efdca2bcea14101a" )
)
// TrustedCheckpoints associates each known checkpoint with the genesis hash of
@ -214,8 +213,8 @@ var (
Threshold : 2 ,
}
// YoloV2ChainConfig contains the chain parameters to run a node on the YOLOv2 test network.
YoloV2 ChainConfig = & ChainConfig {
// YoloV3ChainConfig contains the chain parameters to run a node on the YOLOv3 test network.
YoloV3 ChainConfig = & ChainConfig {
ChainID : big . NewInt ( 133519467574834 ) ,
HomesteadBlock : big . NewInt ( 0 ) ,
DAOForkBlock : nil ,
@ -228,7 +227,7 @@ var (
PetersburgBlock : big . NewInt ( 0 ) ,
IstanbulBlock : big . NewInt ( 0 ) ,
MuirGlacierBlock : nil ,
YoloV2 Block : big . NewInt ( 0 ) ,
YoloV3 Block : big . NewInt ( 0 ) ,
Clique : & CliqueConfig {
Period : 15 ,
Epoch : 30000 ,
@ -321,7 +320,7 @@ type ChainConfig struct {
IstanbulBlock * big . Int ` json:"istanbulBlock,omitempty" ` // Istanbul switch block (nil = no fork, 0 = already on istanbul)
MuirGlacierBlock * big . Int ` json:"muirGlacierBlock,omitempty" ` // Eip-2384 (bomb delay) switch block (nil = no fork, 0 = already activated)
YoloV2 Block * big . Int ` json:"yoloV2Block,omitempty" ` // YOLO v2 : Gas repricings TODO @holiman add EIP references
YoloV3 Block * big . Int ` json:"yoloV3Block,omitempty" ` // YOLO v3 : Gas repricings TODO @holiman add EIP references
EWASMBlock * big . Int ` json:"ewasmBlock,omitempty" ` // EWASM switch block (nil = no fork, 0 = already activated)
// Various consensus engines
@ -359,7 +358,7 @@ func (c *ChainConfig) String() string {
default :
engine = "unknown"
}
return fmt . Sprintf ( "{ChainID: %v Homestead: %v DAO: %v DAOSupport: %v EIP150: %v EIP155: %v EIP158: %v Byzantium: %v Constantinople: %v Petersburg: %v Istanbul: %v, Muir Glacier: %v, YOLO v2 : %v, Engine: %v}" ,
return fmt . Sprintf ( "{ChainID: %v Homestead: %v DAO: %v DAOSupport: %v EIP150: %v EIP155: %v EIP158: %v Byzantium: %v Constantinople: %v Petersburg: %v Istanbul: %v, Muir Glacier: %v, YOLO v3 : %v, Engine: %v}" ,
c . ChainID ,
c . HomesteadBlock ,
c . DAOForkBlock ,
@ -372,7 +371,7 @@ func (c *ChainConfig) String() string {
c . PetersburgBlock ,
c . IstanbulBlock ,
c . MuirGlacierBlock ,
c . YoloV2 Block ,
c . YoloV3 Block ,
engine ,
)
}
@ -429,9 +428,9 @@ func (c *ChainConfig) IsIstanbul(num *big.Int) bool {
return isForked ( c . IstanbulBlock , num )
}
// IsYoloV2 returns whether num is either equal to the YoloV1 fork block or greater.
func ( c * ChainConfig ) IsYoloV2 ( num * big . Int ) bool {
return isForked ( c . YoloV2 Block , num )
// IsYoloV3 returns whether num is either equal to the YoloV3 fork block or greater.
func ( c * ChainConfig ) IsYoloV3 ( num * big . Int ) bool {
return isForked ( c . YoloV3 Block , num )
}
// IsEWASM returns whether num represents a block number after the EWASM fork
@ -477,7 +476,7 @@ func (c *ChainConfig) CheckConfigForkOrder() error {
{ name : "petersburgBlock" , block : c . PetersburgBlock } ,
{ name : "istanbulBlock" , block : c . IstanbulBlock } ,
{ name : "muirGlacierBlock" , block : c . MuirGlacierBlock , optional : true } ,
{ name : "yoloV2 Block" , block : c . YoloV2 Block } ,
{ name : "yoloV3 Block" , block : c . YoloV3 Block } ,
} {
if lastFork . name != "" {
// Next one must be higher number
@ -541,8 +540,8 @@ func (c *ChainConfig) checkCompatible(newcfg *ChainConfig, head *big.Int) *Confi
if isForkIncompatible ( c . MuirGlacierBlock , newcfg . MuirGlacierBlock , head ) {
return newCompatError ( "Muir Glacier fork block" , c . MuirGlacierBlock , newcfg . MuirGlacierBlock )
}
if isForkIncompatible ( c . YoloV2 Block , newcfg . YoloV2 Block , head ) {
return newCompatError ( "YOLOv2 fork block" , c . YoloV2 Block , newcfg . YoloV2 Block )
if isForkIncompatible ( c . YoloV3 Block , newcfg . YoloV3 Block , head ) {
return newCompatError ( "YOLOv3 fork block" , c . YoloV3 Block , newcfg . YoloV3 Block )
}
if isForkIncompatible ( c . EWASMBlock , newcfg . EWASMBlock , head ) {
return newCompatError ( "ewasm fork block" , c . EWASMBlock , newcfg . EWASMBlock )
@ -614,7 +613,7 @@ type Rules struct {
ChainID * big . Int
IsHomestead , IsEIP150 , IsEIP155 , IsEIP158 bool
IsByzantium , IsConstantinople , IsPetersburg , IsIstanbul bool
IsYoloV2 bool
IsYoloV3 bool
}
// Rules ensures c's ChainID is not nil.
@ -633,6 +632,6 @@ func (c *ChainConfig) Rules(num *big.Int) Rules {
IsConstantinople : c . IsConstantinople ( num ) ,
IsPetersburg : c . IsPetersburg ( num ) ,
IsIstanbul : c . IsIstanbul ( num ) ,
IsYoloV2 : c . IsYoloV2 ( num ) ,
IsYoloV3 : c . IsYoloV3 ( num ) ,
}
}