Skip to content

Commit ff23c52

Browse files
authored
feat: schedule DarwinV2 (#1002)
* refactor: add darwinV2 to tests, improve log format * feat: schedule DarwinV2
1 parent 03f3b2b commit ff23c52

File tree

6 files changed

+24
-4
lines changed

6 files changed

+24
-4
lines changed

core/blockchain_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3723,6 +3723,7 @@ func TestCurieTransition(t *testing.T) {
37233723
json.Unmarshal(b, &config)
37243724
config.CurieBlock = big.NewInt(2)
37253725
config.DarwinTime = nil
3726+
config.DarwinV2Time = nil
37263727

37273728
var (
37283729
db = rawdb.NewMemoryDatabase()

core/state_processor_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ func TestStateProcessorErrors(t *testing.T) {
5959
BernoulliBlock: big.NewInt(0),
6060
CurieBlock: big.NewInt(0),
6161
DarwinTime: new(uint64),
62+
DarwinV2Time: new(uint64),
6263
Ethash: new(params.EthashConfig),
6364
}
6465
signer = types.LatestSigner(config)

core/vm/runtime/runtime.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ func setDefaults(cfg *Config) {
7373
BernoulliBlock: new(big.Int),
7474
CurieBlock: new(big.Int),
7575
DarwinTime: new(uint64),
76+
DarwinV2Time: new(uint64),
7677
}
7778
}
7879

eth/gasprice/gasprice_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@ func newTestBackend(t *testing.T, londonBlock *big.Int, pending bool, pendingTxC
123123
config.BernoulliBlock = londonBlock
124124
config.CurieBlock = londonBlock
125125
config.DarwinTime = nil
126+
config.DarwinV2Time = nil
126127
engine := ethash.NewFaker()
127128
db := rawdb.NewMemoryDatabase()
128129
genesis, err := gspec.Commit(db)

params/config.go

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,7 @@ var (
284284
BernoulliBlock: nil,
285285
CurieBlock: nil,
286286
DarwinTime: nil,
287+
DarwinV2Time: nil,
287288
Clique: &CliqueConfig{
288289
Period: 3,
289290
Epoch: 30000,
@@ -323,6 +324,7 @@ var (
323324
BernoulliBlock: big.NewInt(3747132),
324325
CurieBlock: big.NewInt(4740239),
325326
DarwinTime: newUint64(1723622400),
327+
DarwinV2Time: newUint64(1724832000),
326328
Clique: &CliqueConfig{
327329
Period: 3,
328330
Epoch: 30000,
@@ -362,6 +364,7 @@ var (
362364
BernoulliBlock: big.NewInt(5220340),
363365
CurieBlock: big.NewInt(7096836),
364366
DarwinTime: newUint64(1724227200),
367+
DarwinV2Time: newUint64(1725264000),
365368
Clique: &CliqueConfig{
366369
Period: 3,
367370
Epoch: 30000,
@@ -407,6 +410,7 @@ var (
407410
BernoulliBlock: big.NewInt(0),
408411
CurieBlock: big.NewInt(0),
409412
DarwinTime: new(uint64),
413+
DarwinV2Time: new(uint64),
410414
TerminalTotalDifficulty: nil,
411415
Ethash: new(EthashConfig),
412416
Clique: nil,
@@ -450,6 +454,7 @@ var (
450454
BernoulliBlock: big.NewInt(0),
451455
CurieBlock: big.NewInt(0),
452456
DarwinTime: new(uint64),
457+
DarwinV2Time: new(uint64),
453458
TerminalTotalDifficulty: nil,
454459
Ethash: nil,
455460
Clique: &CliqueConfig{Period: 0, Epoch: 30000},
@@ -488,6 +493,7 @@ var (
488493
BernoulliBlock: big.NewInt(0),
489494
CurieBlock: big.NewInt(0),
490495
DarwinTime: new(uint64),
496+
DarwinV2Time: new(uint64),
491497
TerminalTotalDifficulty: nil,
492498
Ethash: new(EthashConfig),
493499
Clique: nil,
@@ -527,6 +533,7 @@ var (
527533
BernoulliBlock: big.NewInt(0),
528534
CurieBlock: big.NewInt(0),
529535
DarwinTime: new(uint64),
536+
DarwinV2Time: new(uint64),
530537
TerminalTotalDifficulty: nil,
531538
Ethash: new(EthashConfig),
532539
Clique: nil,
@@ -744,7 +751,15 @@ func (c *ChainConfig) String() string {
744751
default:
745752
engine = "unknown"
746753
}
747-
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, Engine: %v, Scroll config: %v}",
754+
darwinTime := "<nil>"
755+
if c.DarwinTime != nil {
756+
darwinTime = fmt.Sprintf("@%v", *c.DarwinTime)
757+
}
758+
darwinV2Time := "<nil>"
759+
if c.DarwinV2Time != nil {
760+
darwinV2Time = fmt.Sprintf("@%v", *c.DarwinV2Time)
761+
}
762+
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, Engine: %v, Scroll config: %v}",
748763
c.ChainID,
749764
c.HomesteadBlock,
750765
c.DAOForkBlock,
@@ -764,7 +779,8 @@ func (c *ChainConfig) String() string {
764779
c.ShanghaiBlock,
765780
c.BernoulliBlock,
766781
c.CurieBlock,
767-
c.DarwinTime,
782+
darwinTime,
783+
darwinV2Time,
768784
engine,
769785
c.Scroll,
770786
)

params/version.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ import (
2323

2424
const (
2525
VersionMajor = 5 // Major version component of the current release
26-
VersionMinor = 6 // Minor version component of the current release
27-
VersionPatch = 5 // Patch version component of the current release
26+
VersionMinor = 7 // Minor version component of the current release
27+
VersionPatch = 0 // Patch version component of the current release
2828
VersionMeta = "mainnet" // Version metadata to append to the version string
2929
)
3030

0 commit comments

Comments
 (0)