From 8dbfc47aac70f5015e1f38a8ac8d297f18e22ac3 Mon Sep 17 00:00:00 2001 From: Giulio Rebuffo Date: Sun, 31 Oct 2021 22:15:29 +0100 Subject: [PATCH 1/5] added TerminalTotalDifficulty to chain config (EIP-3675) --- params/config.go | 1 + 1 file changed, 1 insertion(+) diff --git a/params/config.go b/params/config.go index b9ebbd919db..b0541afca75 100644 --- a/params/config.go +++ b/params/config.go @@ -421,6 +421,7 @@ type ChainConfig struct { LondonBlock *big.Int `json:"londonBlock,omitempty"` // London switch block (nil = no fork, 0 = already on london) ArrowGlacierBlock *big.Int `json:"arrowGlacierBlock,omitempty"` // EIP-4345 (bomb delay) switch block (nil = no fork, 0 = already activated) + TerminalTotalDifficulty *big.Int `json: "terminalTotalDifficulty, omitempty"` // EIP-3675: Upgrade consensus to Proof-of-Stake when terminal total difficulty is reached // Various consensus engines Ethash *EthashConfig `json:"ethash,omitempty"` Clique *CliqueConfig `json:"clique,omitempty"` From 58c2f58d2c0762eb81fd88859c68109db5978e93 Mon Sep 17 00:00:00 2001 From: Giulio Rebuffo Date: Sun, 31 Oct 2021 22:17:11 +0100 Subject: [PATCH 2/5] better comments --- params/config.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/params/config.go b/params/config.go index b0541afca75..daed2a1bd9d 100644 --- a/params/config.go +++ b/params/config.go @@ -421,7 +421,8 @@ type ChainConfig struct { LondonBlock *big.Int `json:"londonBlock,omitempty"` // London switch block (nil = no fork, 0 = already on london) ArrowGlacierBlock *big.Int `json:"arrowGlacierBlock,omitempty"` // EIP-4345 (bomb delay) switch block (nil = no fork, 0 = already activated) - TerminalTotalDifficulty *big.Int `json: "terminalTotalDifficulty, omitempty"` // EIP-3675: Upgrade consensus to Proof-of-Stake when terminal total difficulty is reached + // EIP-3675: Upgrade consensus to Proof-of-Stake + TerminalTotalDifficulty *big.Int `json: "terminalTotalDifficulty, omitempty"` // The merge happens when terminal total difficulty is reached // Various consensus engines Ethash *EthashConfig `json:"ethash,omitempty"` Clique *CliqueConfig `json:"clique,omitempty"` From 485c5c6c2b679b146a596fb80efe639f46324ec6 Mon Sep 17 00:00:00 2001 From: Giulio Rebuffo Date: Sun, 31 Oct 2021 22:17:28 +0100 Subject: [PATCH 3/5] better omitempty --- params/config.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/params/config.go b/params/config.go index daed2a1bd9d..6c6ee6cc134 100644 --- a/params/config.go +++ b/params/config.go @@ -422,7 +422,7 @@ type ChainConfig struct { ArrowGlacierBlock *big.Int `json:"arrowGlacierBlock,omitempty"` // EIP-4345 (bomb delay) switch block (nil = no fork, 0 = already activated) // EIP-3675: Upgrade consensus to Proof-of-Stake - TerminalTotalDifficulty *big.Int `json: "terminalTotalDifficulty, omitempty"` // The merge happens when terminal total difficulty is reached + TerminalTotalDifficulty *big.Int `json: "terminalTotalDifficulty,omitempty"` // The merge happens when terminal total difficulty is reached // Various consensus engines Ethash *EthashConfig `json:"ethash,omitempty"` Clique *CliqueConfig `json:"clique,omitempty"` From e971c12fe5ba58b388321c0a7457f8bde7791376 Mon Sep 17 00:00:00 2001 From: Giulio Rebuffo Date: Mon, 1 Nov 2021 14:40:47 +0100 Subject: [PATCH 4/5] lint --- params/config.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/params/config.go b/params/config.go index 6c6ee6cc134..5ace8143f68 100644 --- a/params/config.go +++ b/params/config.go @@ -421,7 +421,7 @@ type ChainConfig struct { LondonBlock *big.Int `json:"londonBlock,omitempty"` // London switch block (nil = no fork, 0 = already on london) ArrowGlacierBlock *big.Int `json:"arrowGlacierBlock,omitempty"` // EIP-4345 (bomb delay) switch block (nil = no fork, 0 = already activated) - // EIP-3675: Upgrade consensus to Proof-of-Stake + // EIP-3675: Upgrade consensus to Proof-of-Stake TerminalTotalDifficulty *big.Int `json: "terminalTotalDifficulty,omitempty"` // The merge happens when terminal total difficulty is reached // Various consensus engines Ethash *EthashConfig `json:"ethash,omitempty"` From 54fd7570a6441ea46e59f1b9ec0a53ee677b95ff Mon Sep 17 00:00:00 2001 From: Giulio rebuffo Date: Tue, 2 Nov 2021 22:57:03 +0100 Subject: [PATCH 5/5] Update config.go --- params/config.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/params/config.go b/params/config.go index 5ace8143f68..5631f7868f1 100644 --- a/params/config.go +++ b/params/config.go @@ -422,7 +422,7 @@ type ChainConfig struct { ArrowGlacierBlock *big.Int `json:"arrowGlacierBlock,omitempty"` // EIP-4345 (bomb delay) switch block (nil = no fork, 0 = already activated) // EIP-3675: Upgrade consensus to Proof-of-Stake - TerminalTotalDifficulty *big.Int `json: "terminalTotalDifficulty,omitempty"` // The merge happens when terminal total difficulty is reached + TerminalTotalDifficulty *big.Int `json:"terminalTotalDifficulty,omitempty"` // The merge happens when terminal total difficulty is reached // Various consensus engines Ethash *EthashConfig `json:"ethash,omitempty"` Clique *CliqueConfig `json:"clique,omitempty"`