diff --git a/.circleci/config.yml b/.circleci/config.yml index bc982162775..253b2ac9602 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -95,7 +95,7 @@ jobs: - capture_test_results integrationTests: - executor: besu_executor_med + executor: besu_executor_xl steps: - prepare - attach_workspace: diff --git a/config/src/main/java/org/hyperledger/besu/config/GenesisConfigOptions.java b/config/src/main/java/org/hyperledger/besu/config/GenesisConfigOptions.java index 982d6dcce17..ec877613dee 100644 --- a/config/src/main/java/org/hyperledger/besu/config/GenesisConfigOptions.java +++ b/config/src/main/java/org/hyperledger/besu/config/GenesisConfigOptions.java @@ -56,6 +56,8 @@ public interface GenesisConfigOptions { OptionalLong getIstanbulBlockNumber(); + OptionalLong getMuirGlacierBlockNumber(); + /** * Block number for the Dao Fork, this value is used to tell node to connect with peer that did * NOT accept the Dao Fork and instead continued as what is now called the classic network diff --git a/config/src/main/java/org/hyperledger/besu/config/JsonGenesisConfigOptions.java b/config/src/main/java/org/hyperledger/besu/config/JsonGenesisConfigOptions.java index e7eb4a5182a..f0f0a6eb4c2 100644 --- a/config/src/main/java/org/hyperledger/besu/config/JsonGenesisConfigOptions.java +++ b/config/src/main/java/org/hyperledger/besu/config/JsonGenesisConfigOptions.java @@ -195,6 +195,11 @@ public OptionalLong getIstanbulBlockNumber() { return getOptionalLong("istanbulblock"); } + @Override + public OptionalLong getMuirGlacierBlockNumber() { + return getOptionalLong("muirglacierblock"); + } + @Override public OptionalLong getClassicForkBlock() { return getOptionalLong("classicforkblock"); @@ -273,6 +278,7 @@ public Map asMap() { getConstantinopleBlockNumber().ifPresent(l -> builder.put("constantinopleBlock", l)); getConstantinopleFixBlockNumber().ifPresent(l -> builder.put("constantinopleFixBlock", l)); getIstanbulBlockNumber().ifPresent(l -> builder.put("istanbulBlock", l)); + getMuirGlacierBlockNumber().ifPresent(l -> builder.put("muirGlacierBlock", l)); getContractSizeLimit().ifPresent(l -> builder.put("contractSizeLimit", l)); getEvmStackSize().ifPresent(l -> builder.put("evmstacksize", l)); if (isClique()) { diff --git a/config/src/main/resources/mainnet.json b/config/src/main/resources/mainnet.json index f23d41cd3d8..cb3b4f7be1d 100644 --- a/config/src/main/resources/mainnet.json +++ b/config/src/main/resources/mainnet.json @@ -11,9 +11,9 @@ "byzantiumBlock": 4370000, "constantinopleBlock": 7280000, "constantinopleFixBlock": 7280000, - "istanbulBlock": 9069000, + "istanbulBlock": 9069000, + "muirGlacierBlock": 9200000, "ethash": { - } }, "nonce": "0x42", diff --git a/config/src/main/resources/ropsten.json b/config/src/main/resources/ropsten.json index 0cb152fe0a7..88aac50a0ae 100644 --- a/config/src/main/resources/ropsten.json +++ b/config/src/main/resources/ropsten.json @@ -9,6 +9,7 @@ "constantinopleBlock": 4230000, "constantinopleFixBlock": 4939394, "istanbulBlock": 6485846, + "muirGlacierBlock": 7117117, "ethash": { } }, diff --git a/config/src/test-support/java/org/hyperledger/besu/config/StubGenesisConfigOptions.java b/config/src/test-support/java/org/hyperledger/besu/config/StubGenesisConfigOptions.java index 8b7920f37d3..4dacd223cf7 100644 --- a/config/src/test-support/java/org/hyperledger/besu/config/StubGenesisConfigOptions.java +++ b/config/src/test-support/java/org/hyperledger/besu/config/StubGenesisConfigOptions.java @@ -32,13 +32,14 @@ public class StubGenesisConfigOptions implements GenesisConfigOptions { private OptionalLong constantinopleBlockNumber = OptionalLong.empty(); private OptionalLong constantinopleFixBlockNumber = OptionalLong.empty(); private OptionalLong istanbulBlockNumber = OptionalLong.empty(); - private OptionalLong classicForkBlock = OptionalLong.empty(); - private OptionalLong ecip1015BlockNumber = OptionalLong.empty(); - private OptionalLong diehardBlockNumber = OptionalLong.empty(); - private OptionalLong gothamBlockNumber = OptionalLong.empty(); - private OptionalLong defuseDifficultyBombBlockNumber = OptionalLong.empty(); - private OptionalLong atlantisBlockNumber = OptionalLong.empty(); - private OptionalLong aghartaBlockNumber = OptionalLong.empty(); + private OptionalLong muirGlacierBlockNumber = OptionalLong.empty(); + private final OptionalLong classicForkBlock = OptionalLong.empty(); + private final OptionalLong ecip1015BlockNumber = OptionalLong.empty(); + private final OptionalLong diehardBlockNumber = OptionalLong.empty(); + private final OptionalLong gothamBlockNumber = OptionalLong.empty(); + private final OptionalLong defuseDifficultyBombBlockNumber = OptionalLong.empty(); + private final OptionalLong atlantisBlockNumber = OptionalLong.empty(); + private final OptionalLong aghartaBlockNumber = OptionalLong.empty(); private Optional chainId = Optional.empty(); private OptionalInt contractSizeLimit = OptionalInt.empty(); private OptionalInt stackSizeLimit = OptionalInt.empty(); @@ -128,6 +129,11 @@ public OptionalLong getIstanbulBlockNumber() { return istanbulBlockNumber; } + @Override + public OptionalLong getMuirGlacierBlockNumber() { + return muirGlacierBlockNumber; + } + @Override public OptionalLong getClassicForkBlock() { return classicForkBlock; @@ -200,6 +206,7 @@ public Map asMap() { getConstantinopleBlockNumber().ifPresent(l -> builder.put("constantinopleBlock", l)); getConstantinopleFixBlockNumber().ifPresent(l -> builder.put("constantinopleFixBlock", l)); getIstanbulBlockNumber().ifPresent(l -> builder.put("istanbulBlock", l)); + getMuirGlacierBlockNumber().ifPresent(l -> builder.put("muirGlacierBlock", l)); getContractSizeLimit().ifPresent(l -> builder.put("contractSizeLimit", l)); getEvmStackSize().ifPresent(l -> builder.put("evmStackSize", l)); if (isClique()) { @@ -262,6 +269,11 @@ public StubGenesisConfigOptions istanbulBlock(final long blockNumber) { return this; } + public StubGenesisConfigOptions muirGlacierBlock(final long blockNumber) { + muirGlacierBlockNumber = OptionalLong.of(blockNumber); + return this; + } + public StubGenesisConfigOptions chainId(final BigInteger chainId) { this.chainId = Optional.ofNullable(chainId); return this; diff --git a/config/src/test/java/org/hyperledger/besu/config/GenesisConfigOptionsTest.java b/config/src/test/java/org/hyperledger/besu/config/GenesisConfigOptionsTest.java index f9b6d10d186..f0d36d25af7 100644 --- a/config/src/test/java/org/hyperledger/besu/config/GenesisConfigOptionsTest.java +++ b/config/src/test/java/org/hyperledger/besu/config/GenesisConfigOptionsTest.java @@ -133,6 +133,12 @@ public void shouldGetIstanbulBlockNumber() { assertThat(config.getIstanbulBlockNumber()).hasValue(1000); } + @Test + public void shouldGetMuirGlacierBlockNumber() { + final GenesisConfigOptions config = fromConfigOptions(singletonMap("muirGlacierBlock", 1000)); + assertThat(config.getMuirGlacierBlockNumber()).hasValue(1000); + } + @Test public void shouldNotReturnEmptyOptionalWhenBlockNumberNotSpecified() { final GenesisConfigOptions config = fromConfigOptions(emptyMap()); @@ -144,6 +150,7 @@ public void shouldNotReturnEmptyOptionalWhenBlockNumberNotSpecified() { assertThat(config.getConstantinopleBlockNumber()).isEmpty(); assertThat(config.getConstantinopleFixBlockNumber()).isEmpty(); assertThat(config.getIstanbulBlockNumber()).isEmpty(); + assertThat(config.getMuirGlacierBlockNumber()).isEmpty(); } @Test diff --git a/ethereum/core/build.gradle b/ethereum/core/build.gradle index 766aef04cd0..8065a4adb86 100644 --- a/ethereum/core/build.gradle +++ b/ethereum/core/build.gradle @@ -90,10 +90,11 @@ task testJar (type: Jar) { } test { + exclude 'org/hyperledger/besu/ethereum/mainnet/DifficultyCalculatorTests.class' + exclude 'org/hyperledger/besu/ethereum/core/TransactionTest.class' exclude 'org/hyperledger/besu/ethereum/vm/**ReferenceTest.class' exclude 'org/hyperledger/besu/ethereum/vm/blockchain/**.class' exclude 'org/hyperledger/besu/ethereum/vm/generalstate/**.class' - exclude 'org/hyperledger/besu/ethereum/core/TransactionTest.class' } def generateTestFiles(FileTree jsonPath, File templateFile, String pathstrip, String destination, String namePrefix) { @@ -185,10 +186,11 @@ task referenceTests(type: Test, dependsOn: [ } scanForTestClasses = false enableAssertions = true + include 'org/hyperledger/besu/ethereum/core/TransactionTest.class' + include 'org/hyperledger/besu/ethereum/mainnet/DifficultyCalculatorTests.class' include 'org/hyperledger/besu/ethereum/vm/**ReferenceTest.class' include 'org/hyperledger/besu/ethereum/vm/blockchain/**.class' include 'org/hyperledger/besu/ethereum/vm/generalstate/**.class' - include 'org/hyperledger/besu/ethereum/core/TransactionTest.class' } artifacts { diff --git a/ethereum/core/src/main/java/org/hyperledger/besu/ethereum/mainnet/MainnetDifficultyCalculators.java b/ethereum/core/src/main/java/org/hyperledger/besu/ethereum/mainnet/MainnetDifficultyCalculators.java index 232ff25e727..79c00c3ad5a 100644 --- a/ethereum/core/src/main/java/org/hyperledger/besu/ethereum/mainnet/MainnetDifficultyCalculators.java +++ b/ethereum/core/src/main/java/org/hyperledger/besu/ethereum/mainnet/MainnetDifficultyCalculators.java @@ -20,6 +20,7 @@ import java.math.BigInteger; +import com.google.common.annotations.VisibleForTesting; import com.google.common.primitives.Ints; /** Provides the various difficultly calculates used on mainnet hard forks. */ @@ -37,6 +38,7 @@ public abstract class MainnetDifficultyCalculators { private static final long BYZANTIUM_FAKE_BLOCK_OFFSET = 2_999_999L; private static final long CONSTANTINOPLE_FAKE_BLOCK_OFFSET = 4_999_999L; + private static final long MUIR_GLACIER_FAKE_BLOCK_OFFSET = 8_999_999L; private MainnetDifficultyCalculators() {} @@ -67,15 +69,20 @@ private MainnetDifficultyCalculators() {} return periodCount > 1 ? adjustForPeriod(periodCount, difficulty) : difficulty; }; + @VisibleForTesting public static DifficultyCalculator BYZANTIUM = (time, parent, protocolContext) -> - calculateByzantiumDifficulty(time, parent, BYZANTIUM_FAKE_BLOCK_OFFSET); + calculateThawedDifficulty(time, parent, BYZANTIUM_FAKE_BLOCK_OFFSET); - public static DifficultyCalculator CONSTANTINOPLE = + static DifficultyCalculator CONSTANTINOPLE = (time, parent, protocolContext) -> - calculateByzantiumDifficulty(time, parent, CONSTANTINOPLE_FAKE_BLOCK_OFFSET); + calculateThawedDifficulty(time, parent, CONSTANTINOPLE_FAKE_BLOCK_OFFSET); - private static BigInteger calculateByzantiumDifficulty( + static DifficultyCalculator MUIR_GLACIER = + (time, parent, protocolContext) -> + calculateThawedDifficulty(time, parent, MUIR_GLACIER_FAKE_BLOCK_OFFSET); + + private static BigInteger calculateThawedDifficulty( final long time, final BlockHeader parent, final long fakeBlockOffset) { final BigInteger parentDifficulty = difficulty(parent.getDifficulty()); final boolean hasOmmers = !parent.getOmmersHash().equals(Hash.EMPTY_LIST_HASH); diff --git a/ethereum/core/src/main/java/org/hyperledger/besu/ethereum/mainnet/MainnetProtocolSpecs.java b/ethereum/core/src/main/java/org/hyperledger/besu/ethereum/mainnet/MainnetProtocolSpecs.java index 6b2f0be1290..0a21b49b2b5 100644 --- a/ethereum/core/src/main/java/org/hyperledger/besu/ethereum/mainnet/MainnetProtocolSpecs.java +++ b/ethereum/core/src/main/java/org/hyperledger/besu/ethereum/mainnet/MainnetProtocolSpecs.java @@ -314,6 +314,16 @@ public static ProtocolSpecBuilder istanbulDefinition( .name("Istanbul"); } + static ProtocolSpecBuilder muirGlacierDefinition( + final Optional chainId, + final OptionalInt contractSizeLimit, + final OptionalInt configStackSizeLimit, + final boolean enableRevertReason) { + return istanbulDefinition(chainId, contractSizeLimit, configStackSizeLimit, enableRevertReason) + .difficultyCalculator(MainnetDifficultyCalculators.MUIR_GLACIER) + .name("MuirGlacier"); + } + private static TransactionReceipt frontierTransactionReceiptFactory( final TransactionProcessor.Result result, final WorldState worldState, final long gasUsed) { return new TransactionReceipt( diff --git a/ethereum/core/src/main/java/org/hyperledger/besu/ethereum/mainnet/ProtocolScheduleBuilder.java b/ethereum/core/src/main/java/org/hyperledger/besu/ethereum/mainnet/ProtocolScheduleBuilder.java index beff0f8d63a..9da157570e9 100644 --- a/ethereum/core/src/main/java/org/hyperledger/besu/ethereum/mainnet/ProtocolScheduleBuilder.java +++ b/ethereum/core/src/main/java/org/hyperledger/besu/ethereum/mainnet/ProtocolScheduleBuilder.java @@ -151,6 +151,14 @@ public ProtocolSchedule createProtocolSchedule() { config.getContractSizeLimit(), config.getEvmStackSize(), isRevertReasonEnabled)); + addProtocolSpec( + protocolSchedule, + config.getMuirGlacierBlockNumber(), + MainnetProtocolSpecs.muirGlacierDefinition( + chainId, + config.getContractSizeLimit(), + config.getEvmStackSize(), + isRevertReasonEnabled)); // specs for classic network config @@ -260,6 +268,8 @@ private void validateEthereumForkOrdering() { validateForkOrder( "ConstantinopleFix", config.getConstantinopleFixBlockNumber(), lastForkBlock); lastForkBlock = validateForkOrder("Istanbul", config.getIstanbulBlockNumber(), lastForkBlock); + lastForkBlock = + validateForkOrder("MuirGlacier", config.getMuirGlacierBlockNumber(), lastForkBlock); assert (lastForkBlock >= 0); } diff --git a/ethereum/core/src/test/java/org/hyperledger/besu/ethereum/mainnet/DifficultyCalculatorTests.java b/ethereum/core/src/test/java/org/hyperledger/besu/ethereum/mainnet/DifficultyCalculatorTests.java new file mode 100644 index 00000000000..c25b9dad332 --- /dev/null +++ b/ethereum/core/src/test/java/org/hyperledger/besu/ethereum/mainnet/DifficultyCalculatorTests.java @@ -0,0 +1,161 @@ +/* + * Copyright ConsenSys AG. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * + */ + +package org.hyperledger.besu.ethereum.mainnet; + +import static org.assertj.core.api.Assertions.assertThat; + +import org.hyperledger.besu.config.GenesisConfigFile; +import org.hyperledger.besu.config.JsonUtil; +import org.hyperledger.besu.ethereum.core.Address; +import org.hyperledger.besu.ethereum.core.BlockHeader; +import org.hyperledger.besu.ethereum.core.BlockHeaderBuilder; +import org.hyperledger.besu.ethereum.core.Hash; +import org.hyperledger.besu.ethereum.core.LogsBloomFilter; +import org.hyperledger.besu.util.bytes.BytesValue; +import org.hyperledger.besu.util.uint.UInt256; + +import java.io.IOException; +import java.nio.charset.StandardCharsets; +import java.util.Collection; +import java.util.List; + +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.node.ObjectNode; +import com.google.common.io.Resources; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.Parameterized; +import org.junit.runners.Parameterized.Parameters; + +@RunWith(Parameterized.class) +public class DifficultyCalculatorTests { + + private final String testFile; + private final ProtocolSchedule protocolSchedule; + + public DifficultyCalculatorTests( + final String testFile, final ProtocolSchedule protocolSchedule) { + this.testFile = testFile; + this.protocolSchedule = protocolSchedule; + } + + @Parameters(name = "TestFile: {0}") + public static Collection getTestParametersForConfig() throws IOException { + return List.of( + new Object[] { + "/BasicTests/difficultyMainNetwork.json", + MainnetProtocolSchedule.fromConfig(GenesisConfigFile.mainnet().getConfigOptions()) + }, + new Object[] { + "/BasicTests/difficultyRopsten.json", + MainnetProtocolSchedule.fromConfig( + GenesisConfigFile.fromConfig( + Resources.toString( + GenesisConfigFile.class.getResource("/ropsten.json"), + StandardCharsets.UTF_8)) + .getConfigOptions()) + }, + new Object[] { + "/BasicTests/difficultyFrontier.json", + MainnetProtocolSchedule.fromConfig( + GenesisConfigFile.fromConfig("{\"config\": {\"frontierBlock\":0}}") + .getConfigOptions()) + }, + new Object[] { + "/BasicTests/difficultyHomestead.json", + MainnetProtocolSchedule.fromConfig( + GenesisConfigFile.fromConfig("{\"config\": {\"homesteadBlock\":0}}") + .getConfigOptions()) + }, + new Object[] { + "/BasicTests/difficultyByzantium.json", + MainnetProtocolSchedule.fromConfig( + GenesisConfigFile.fromConfig("{\"config\": {\"byzantiumBlock\":0}}") + .getConfigOptions()) + }, + new Object[] { + "/BasicTests/difficultyConstantinople.json", + MainnetProtocolSchedule.fromConfig( + GenesisConfigFile.fromConfig("{\"config\": {\"constantinopleBlock\":0}}") + .getConfigOptions()) + }, + new Object[] { + "/BasicTests/difficultyEIP2384.json", + MainnetProtocolSchedule.fromConfig( + GenesisConfigFile.fromConfig("{\"config\":{\"muirGlacierBlock\":0}}") + .getConfigOptions()) + }, + new Object[] { + "/BasicTests/difficultyEIP2384_random.json", + MainnetProtocolSchedule.fromConfig( + GenesisConfigFile.fromConfig("{\"config\":{\"muirGlacierBlock\":0}}") + .getConfigOptions()) + }, + new Object[] { + "/BasicTests/difficultyEIP2384_random_to20M.json", + MainnetProtocolSchedule.fromConfig( + GenesisConfigFile.fromConfig("{\"config\":{\"muirGlacierBlock\":0}}") + .getConfigOptions()) + }); + } + + @Test + public void testDifficultyCalculation() throws IOException { + MainnetBlockHeaderFunctions blockHeaderFunctions = new MainnetBlockHeaderFunctions(); + final ObjectNode testObject = + JsonUtil.objectNodeFromString( + Resources.toString( + DifficultyCalculatorTests.class.getResource(testFile), StandardCharsets.UTF_8)); + final var fields = testObject.fields(); + while (fields.hasNext()) { + final var entry = fields.next(); + final JsonNode value = entry.getValue(); + final long currentBlockNumber = extractLong(value, "currentBlockNumber"); + final BlockHeader testHeader = + BlockHeaderBuilder.create() + .parentHash(Hash.EMPTY) + .coinbase(Address.ZERO) + .gasLimit(Long.MAX_VALUE) + .stateRoot(Hash.EMPTY) + .transactionsRoot(Hash.EMPTY) + .receiptsRoot(Hash.EMPTY) + .logsBloom(new LogsBloomFilter()) + .gasUsed(0) + .extraData(BytesValue.of()) + .mixHash(Hash.EMPTY) + .nonce(0) + .blockHeaderFunctions(blockHeaderFunctions) + .timestamp(extractLong(value, "parentTimestamp")) + .difficulty(UInt256.fromHexString(value.get("parentDifficulty").asText())) + .ommersHash(Hash.fromHexString(value.get("parentUncles").asText())) + .number(currentBlockNumber) + .buildBlockHeader(); + final long currentTime = extractLong(value, "currentTimestamp"); + final UInt256 currentDifficulty = + UInt256.fromHexString(value.get("currentDifficulty").asText()); + final var spec = protocolSchedule.getByBlockNumber(currentBlockNumber); + final var calculator = spec.getDifficultyCalculator(); + assertThat(UInt256.of(calculator.nextDifficulty(currentTime, testHeader, null))) + .describedAs("File %s Test %s", testFile, entry.getKey()) + .isEqualTo(currentDifficulty); + } + } + + private long extractLong(final JsonNode node, final String name) { + return Long.decode(node.get(name).asText()); + } +} diff --git a/ethereum/core/src/test/java/org/hyperledger/besu/ethereum/mainnet/MainnetProtocolScheduleTest.java b/ethereum/core/src/test/java/org/hyperledger/besu/ethereum/mainnet/MainnetProtocolScheduleTest.java index b00e11836a8..7d1a5659d94 100644 --- a/ethereum/core/src/test/java/org/hyperledger/besu/ethereum/mainnet/MainnetProtocolScheduleTest.java +++ b/ethereum/core/src/test/java/org/hyperledger/besu/ethereum/mainnet/MainnetProtocolScheduleTest.java @@ -43,7 +43,9 @@ public void shouldReturnDefaultProtocolSpecsWhenCustomNumbersAreNotUsed() { Assertions.assertThat(sched.getByBlockNumber(7_280_000L).getName()) .isEqualTo("ConstantinopleFix"); Assertions.assertThat(sched.getByBlockNumber(9_069_000L).getName()).isEqualTo("Istanbul"); - Assertions.assertThat(sched.getByBlockNumber(Long.MAX_VALUE).getName()).isEqualTo("Istanbul"); + Assertions.assertThat(sched.getByBlockNumber(9_200_000L).getName()).isEqualTo("MuirGlacier"); + Assertions.assertThat(sched.getByBlockNumber(Long.MAX_VALUE).getName()) + .isEqualTo("MuirGlacier"); } @Test @@ -101,7 +103,9 @@ public void shouldCreateRopstenConfig() throws Exception { Assertions.assertThat(sched.getByBlockNumber(4_939_394L).getName()) .isEqualTo("ConstantinopleFix"); Assertions.assertThat(sched.getByBlockNumber(6_485_846L).getName()).isEqualTo("Istanbul"); - Assertions.assertThat(sched.getByBlockNumber(Long.MAX_VALUE).getName()).isEqualTo("Istanbul"); + Assertions.assertThat(sched.getByBlockNumber(7_117_117L).getName()).isEqualTo("MuirGlacier"); + Assertions.assertThat(sched.getByBlockNumber(Long.MAX_VALUE).getName()) + .isEqualTo("MuirGlacier"); } @Test diff --git a/ethereum/core/src/test/java/org/hyperledger/besu/ethereum/vm/ReferenceTestProtocolSchedules.java b/ethereum/core/src/test/java/org/hyperledger/besu/ethereum/vm/ReferenceTestProtocolSchedules.java index eb0e733d8c1..99c4deadd86 100644 --- a/ethereum/core/src/test/java/org/hyperledger/besu/ethereum/vm/ReferenceTestProtocolSchedules.java +++ b/ethereum/core/src/test/java/org/hyperledger/besu/ethereum/vm/ReferenceTestProtocolSchedules.java @@ -54,6 +54,7 @@ public static ReferenceTestProtocolSchedules create() { "ConstantinopleFix", createSchedule(new StubGenesisConfigOptions().constantinopleFixBlock(0))); builder.put("Istanbul", createSchedule(new StubGenesisConfigOptions().istanbulBlock(0))); + builder.put("MuirGlacier", createSchedule(new StubGenesisConfigOptions().muirGlacierBlock(0))); return new ReferenceTestProtocolSchedules(builder.build()); } diff --git a/ethereum/referencetests/src/test/resources b/ethereum/referencetests/src/test/resources index cfbcd15f91d..73bfbcc213e 160000 --- a/ethereum/referencetests/src/test/resources +++ b/ethereum/referencetests/src/test/resources @@ -1 +1 @@ -Subproject commit cfbcd15f91d4d6e1785d9cae5c5c37f47e8bad46 +Subproject commit 73bfbcc213efd7cabe678a46c83596024e85e2e2 diff --git a/ethereum/retesteth/src/main/java/org/hyperledger/besu/ethereum/retesteth/methods/TestSetChainParams.java b/ethereum/retesteth/src/main/java/org/hyperledger/besu/ethereum/retesteth/methods/TestSetChainParams.java index 4bf05779f3b..0f057a720e4 100644 --- a/ethereum/retesteth/src/main/java/org/hyperledger/besu/ethereum/retesteth/methods/TestSetChainParams.java +++ b/ethereum/retesteth/src/main/java/org/hyperledger/besu/ethereum/retesteth/methods/TestSetChainParams.java @@ -119,6 +119,7 @@ private static String modifyGenesisFile(final String initialGenesis) { maybeMoveToNumber(params, "constantinopleForkBlock", config, "constantinopleBlock"); maybeMoveToNumber(params, "constantinopleFixForkBlock", config, "constantinopleFixBlock"); maybeMoveToNumber(params, "istanbulForkBlock", config, "istanbulBlock"); + maybeMoveToNumber(params, "muirGlacierForkBlock", config, "muirGlacierBlock"); maybeMoveToNumber(params, "chainID", config, "chainId", 1); maybeMove(genesis, "author", chainParamsJson, "coinbase"); maybeMove(genesis, "difficulty", chainParamsJson, "difficulty");