From 5f2bd732a9e62059cec47f9e84a6334f582c1626 Mon Sep 17 00:00:00 2001 From: Talha Cross <47772477+soc1c@users.noreply.github.com> Date: Thu, 12 Dec 2019 14:59:10 +0100 Subject: [PATCH 1/3] params: activate agharta on classic 9573000 --- params/config_classic.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/params/config_classic.go b/params/config_classic.go index 42100fe39e..56ae82dbcf 100644 --- a/params/config_classic.go +++ b/params/config_classic.go @@ -36,7 +36,8 @@ var ( DisposalBlock: big.NewInt(5900000), SocialBlock: nil, EthersocialBlock: nil, - ConstantinopleBlock: nil, + ConstantinopleBlock: big.NewInt(9573000), + PetersburgBlock: big.NewInt(9573000), ECIP1017FBlock: big.NewInt(5000000), ECIP1017EraRounds: big.NewInt(5000000), EIP160FBlock: big.NewInt(3000000), From 405f57b998ce509e9cd198d5c3679306bce6b27c Mon Sep 17 00:00:00 2001 From: Wei Tang Date: Fri, 13 Dec 2019 23:36:19 +0100 Subject: [PATCH 2/3] Enable Constantinople and Petersburg on Ethereum Classic Signed-off-by: meows --- consensus/ethash/consensus.go | 33 ++++++++++++++++----------------- 1 file changed, 16 insertions(+), 17 deletions(-) diff --git a/consensus/ethash/consensus.go b/consensus/ethash/consensus.go index 33b0e69b75..63cad19561 100644 --- a/consensus/ethash/consensus.go +++ b/consensus/ethash/consensus.go @@ -561,27 +561,26 @@ var ( // reward. The total reward consists of the static block reward and rewards for // included uncles. The coinbase of each uncle block is also rewarded. func accumulateRewards(config *params.ChainConfig, state *state.StateDB, header *types.Header, uncles []*types.Header) { - // Select the correct block reward based on chain progression - blockReward := FrontierBlockReward - if config.IsEIP649F(header.Number) { - blockReward = EIP649FBlockReward - } - if config.IsEIP1234F(header.Number) { - blockReward = EIP1234FBlockReward - } - if config.IsSocial(header.Number) { - blockReward = params.SocialBlockReward - } - if config.IsEthersocial(header.Number) { - blockReward = params.EthersocialBlockReward - } if config.IsMCIP0(header.Number) { musicoinBlockReward(config, state, header, uncles) - return - } - if config.IsECIP1017F(header.Number) { + } else if config.IsECIP1017F(header.Number) { ecip1017BlockReward(config, state, header, uncles) } else { + // Select the correct block reward based on chain progression + blockReward := FrontierBlockReward + if config.IsEIP649F(header.Number) { + blockReward = EIP649FBlockReward + } + if config.IsEIP1234F(header.Number) { + blockReward = EIP1234FBlockReward + } + if config.IsSocial(header.Number) { + blockReward = params.SocialBlockReward + } + if config.IsEthersocial(header.Number) { + blockReward = params.EthersocialBlockReward + } + // Accumulate the rewards for the miner and any included uncles reward := new(big.Int).Set(blockReward) r := new(big.Int) From aedaa139547b6eb52c2f248e1a8668e278acb52e Mon Sep 17 00:00:00 2001 From: meows Date: Sun, 15 Dec 2019 08:15:08 -0600 Subject: [PATCH 3/3] core/forkid: update forkid test to include etc 9573000 fork Signed-off-by: meows --- core/forkid/forkid_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/forkid/forkid_test.go b/core/forkid/forkid_test.go index ef85c4e6d2..6567bd4ec3 100644 --- a/core/forkid/forkid_test.go +++ b/core/forkid/forkid_test.go @@ -229,7 +229,7 @@ func TestGatherForks(t *testing.T) { }{ { params.ClassicChainConfig, - []uint64{1150000, 1920000, 2500000, 3000000, 5000000, 5900000, 8772000}, + []uint64{1150000, 1920000, 2500000, 3000000, 5000000, 5900000, 8772000, 9573000}, }, } sliceContains := func (sl []uint64, u uint64) bool {