Skip to content

Commit d0d0194

Browse files
committed
etcm-72 added checkpoint block validator
1 parent d1fdd7a commit d0d0194

25 files changed

+775
-40
lines changed

src/ets/scala/io/iohk/ethereum/ets/blockchain/BlockchainTestConfig.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@ object BlockchainTestConfig {
4444
aghartaBlockNumber = Long.MaxValue,
4545
phoenixBlockNumber = Long.MaxValue,
4646
ecip1098BlockNumber = Long.MaxValue,
47-
treasuryAddress = Address(0)
47+
treasuryAddress = Address(0),
48+
ecip1097BlockNumber = Long.MaxValue
4849
)
4950

5051
val FrontierConfig = BaseBlockchainConfig.copy(

src/it/scala/io/iohk/ethereum/txExecTest/ECIP1017Test.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ class ECIP1017Test extends AnyFlatSpec with Matchers {
4646
phoenixBlockNumber = Long.MaxValue,
4747
petersburgBlockNumber = Long.MaxValue,
4848
ecip1098BlockNumber = Long.MaxValue,
49-
treasuryAddress = Address(0)
49+
treasuryAddress = Address(0),
50+
ecip1097BlockNumber = Long.MaxValue
5051
)
5152
val ec = ExecutionContext.fromExecutor(Executors.newFixedThreadPool(4))
5253

src/it/scala/io/iohk/ethereum/txExecTest/ForksTest.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@ class ForksTest extends AnyFlatSpec with Matchers {
4545
phoenixBlockNumber = Long.MaxValue,
4646
petersburgBlockNumber = Long.MaxValue,
4747
ecip1098BlockNumber = Long.MaxValue,
48-
treasuryAddress = Address(0)
48+
treasuryAddress = Address(0),
49+
ecip1097BlockNumber = Long.MaxValue
4950
)
5051

5152
val noErrors = a[Right[_, Seq[Receipt]]]

src/main/resources/chains/etc-chain.conf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,10 @@
8383
treasury-address = "0011223344556677889900112233445566778899"
8484
ecip1098-block-number = "1000000000000000000"
8585

86+
# Checkpointing fork block number
87+
# https://ecips.ethereumclassic.org/ECIPs/ecip-1097
88+
ecip1097-block-number = "1000000000000000000"
89+
8690
# DAO fork configuration (Ethereum HF/Classic split)
8791
# https://blog.ethereum.org/2016/07/20/hard-fork-completed/
8892
dao {

src/main/resources/chains/eth-chain.conf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,10 @@
8383
treasury-address = "0011223344556677889900112233445566778899"
8484
ecip1098-block-number = "1000000000000000000"
8585

86+
# Checkpointing fork block number
87+
# https://ecips.ethereumclassic.org/ECIPs/ecip-1097
88+
ecip1097-block-number = "1000000000000000000"
89+
8690
# DAO fork configuration (Ethereum HF/Classic split)
8791
# https://blog.ethereum.org/2016/07/20/hard-fork-completed/
8892
dao {

src/main/resources/chains/mordor-chain.conf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,10 @@
8383
treasury-address = "0011223344556677889900112233445566778899"
8484
ecip1098-block-number = "1000000000000000000"
8585

86+
# Checkpointing fork block number
87+
# https://ecips.ethereumclassic.org/ECIPs/ecip-1097
88+
ecip1097-block-number = "1000000000000000000"
89+
8690
# DAO fork configuration (Ethereum HF/Classic split)
8791
# https://blog.ethereum.org/2016/07/20/hard-fork-completed/
8892
dao = null

src/main/resources/chains/ropsten-chain.conf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,10 @@
8686
treasury-address = "0011223344556677889900112233445566778899"
8787
ecip1098-block-number = "1000000000000000000"
8888

89+
# Checkpointing fork block number
90+
# https://ecips.ethereumclassic.org/ECIPs/ecip-1097
91+
ecip1097-block-number = "1000000000000000000"
92+
8993
# DAO fork configuration (Ethereum HF/Classic split)
9094
# https://blog.ethereum.org/2016/07/20/hard-fork-completed/
9195
dao {

src/main/resources/chains/test-chain.conf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,10 @@
8383
treasury-address = "0011223344556677889900112233445566778899"
8484
ecip1098-block-number = "1000000000000000000"
8585

86+
# Checkpointing fork block number
87+
# https://ecips.ethereumclassic.org/ECIPs/ecip-1097
88+
ecip1097-block-number = "1000000000000000000"
89+
8690
# DAO fork configuration (Ethereum HF/Classic split)
8791
# https://blog.ethereum.org/2016/07/20/hard-fork-completed/
8892
dao {

src/main/resources/chains/testnet-internal-chain.conf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,10 @@
8383
treasury-address = "0011223344556677889900112233445566778899"
8484
ecip1098-block-number = "1000000000000000000"
8585

86+
# Checkpointing fork block number
87+
# https://ecips.ethereumclassic.org/ECIPs/ecip-1097
88+
ecip1097-block-number = "1000000000000000000"
89+
8690
# DAO fork configuration (Ethereum HF/Classic split)
8791
# https://blog.ethereum.org/2016/07/20/hard-fork-completed/
8892
dao = null

src/main/scala/io/iohk/ethereum/consensus/ethash/difficulty/EthashDifficultyCalculator.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class EthashDifficultyCalculator(blockchainConfig: BlockchainConfig) extends Dif
2222
if (blockNumber < homesteadBlockNumber) {
2323
if (blockTimestamp < parentHeader.unixTimestamp + 13) 1 else -1
2424
} else if (blockNumber >= byzantiumBlockNumber || blockNumber >= blockchainConfig.atlantisBlockNumber) {
25-
val parentUncleFactor = if (parentHeader.ommersHash == BlockHeader.emptyOmmerHash) 1 else 2
25+
val parentUncleFactor = if (parentHeader.ommersHash == BlockHeader.EmptyOmmers) 1 else 2
2626
math.max(parentUncleFactor - (timestampDiff / 9), FrontierTimestampDiffLimit)
2727
} else {
2828
math.max(1 - (timestampDiff / 10), FrontierTimestampDiffLimit)

0 commit comments

Comments
 (0)