@@ -334,6 +334,7 @@ var (
334334 EuclidV2Time : newUint64 (1741852800 ),
335335 FeynmanTime : newUint64 (1753167600 ),
336336 GalileoTime : newUint64 (1764054000 ),
337+ GalileoV2Time : nil ,
337338 Clique : & CliqueConfig {
338339 Period : 3 ,
339340 Epoch : 30000 ,
@@ -387,6 +388,8 @@ var (
387388 EuclidTime : newUint64 (1744815600 ),
388389 EuclidV2Time : newUint64 (1745305200 ),
389390 FeynmanTime : newUint64 (1755576000 ),
391+ GalileoTime : nil ,
392+ GalileoV2Time : nil ,
390393 Clique : & CliqueConfig {
391394 Period : 3 ,
392395 Epoch : 30000 ,
@@ -672,6 +675,7 @@ type ChainConfig struct {
672675 EuclidV2Time * uint64 `json:"euclidv2Time,omitempty"` // EuclidV2 switch time (nil = no fork, 0 = already on euclidv2)
673676 FeynmanTime * uint64 `json:"feynmanTime,omitempty"` // Feynman switch time (nil = no fork, 0 = already on feynman)
674677 GalileoTime * uint64 `json:"galileoTime,omitempty"` // Galileo switch time (nil = no fork, 0 = already on galileo)
678+ GalileoV2Time * uint64 `json:"galileoV2Time,omitempty"` // GalileoV2 switch time (nil = no fork, 0 = already on galileoV2)
675679
676680 // TerminalTotalDifficulty is the amount of total difficulty reached by
677681 // the network that triggers the consensus upgrade.
@@ -878,7 +882,11 @@ func (c *ChainConfig) String() string {
878882 if c .GalileoTime != nil {
879883 galileoTime = fmt .Sprintf ("@%v" , * c .GalileoTime )
880884 }
881- 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, Berlin: %v, London: %v, Arrow Glacier: %v, Archimedes: %v, Shanghai: %v, Bernoulli: %v, Curie: %v, Darwin: %v, DarwinV2: %v, Euclid: %v, EuclidV2: %v, Feynman: %v, Galileo: %v, Engine: %v, Scroll config: %v}" ,
885+ galileoV2Time := "<nil>"
886+ if c .GalileoV2Time != nil {
887+ galileoV2Time = fmt .Sprintf ("@%v" , * c .GalileoV2Time )
888+ }
889+ 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, Berlin: %v, London: %v, Arrow Glacier: %v, Archimedes: %v, Shanghai: %v, Bernoulli: %v, Curie: %v, Darwin: %v, DarwinV2: %v, Euclid: %v, EuclidV2: %v, Feynman: %v, Galileo: %v, GalileoV2: %v, Engine: %v, Scroll config: %v}" ,
882890 c .ChainID ,
883891 c .HomesteadBlock ,
884892 c .DAOForkBlock ,
@@ -904,6 +912,7 @@ func (c *ChainConfig) String() string {
904912 euclidV2Time ,
905913 feynmanTime ,
906914 galileoTime ,
915+ galileoV2Time ,
907916 engine ,
908917 c .Scroll ,
909918 )
@@ -1021,13 +1030,22 @@ func (c *ChainConfig) IsFeynman(now uint64) bool {
10211030 return isForkedTime (now , c .FeynmanTime )
10221031}
10231032
1033+ // IsFeynmanTransitionBlock returns whether the given block timestamp corresponds to the first Feynman block.
1034+ func (c * ChainConfig ) IsFeynmanTransitionBlock (blockTimestamp uint64 , parentTimestamp uint64 ) bool {
1035+ return isForkedTime (blockTimestamp , c .FeynmanTime ) && ! isForkedTime (parentTimestamp , c .FeynmanTime )
1036+ }
1037+
10241038func (c * ChainConfig ) IsGalileo (now uint64 ) bool {
10251039 return isForkedTime (now , c .GalileoTime )
10261040}
10271041
1028- // IsFeynmanTransitionBlock returns whether the given block timestamp corresponds to the first Feynman block.
1029- func (c * ChainConfig ) IsFeynmanTransitionBlock (blockTimestamp uint64 , parentTimestamp uint64 ) bool {
1030- return isForkedTime (blockTimestamp , c .FeynmanTime ) && ! isForkedTime (parentTimestamp , c .FeynmanTime )
1042+ func (c * ChainConfig ) IsGalileoV2 (now uint64 ) bool {
1043+ return isForkedTime (now , c .GalileoV2Time )
1044+ }
1045+
1046+ // IsGalileoV2TransitionBlock returns whether the given block timestamp corresponds to the first GalileoV2 block.
1047+ func (c * ChainConfig ) IsGalileoV2TransitionBlock (blockTimestamp uint64 , parentTimestamp uint64 ) bool {
1048+ return isForkedTime (blockTimestamp , c .GalileoV2Time ) && ! isForkedTime (parentTimestamp , c .GalileoV2Time )
10311049}
10321050
10331051// IsScroll returns whether the node is an scroll node or not.
@@ -1258,7 +1276,7 @@ type Rules struct {
12581276 IsByzantium , IsConstantinople , IsPetersburg , IsIstanbul bool
12591277 IsBerlin , IsLondon , IsArchimedes , IsShanghai bool
12601278 IsBernoulli , IsCurie , IsDarwin , IsEuclid , IsEuclidV2 bool
1261- IsFeynman , IsGalileo bool
1279+ IsFeynman , IsGalileo , IsGalileoV2 bool
12621280}
12631281
12641282// Rules ensures c's ChainID is not nil.
@@ -1288,5 +1306,6 @@ func (c *ChainConfig) Rules(num *big.Int, time uint64) Rules {
12881306 IsEuclidV2 : c .IsEuclidV2 (time ),
12891307 IsFeynman : c .IsFeynman (time ),
12901308 IsGalileo : c .IsGalileo (time ),
1309+ IsGalileoV2 : c .IsGalileoV2 (time ),
12911310 }
12921311}
0 commit comments