From 74bad9a019fdeff0348fe0f18171364a46d807da Mon Sep 17 00:00:00 2001 From: Justin Florentine Date: Thu, 8 Feb 2024 10:25:52 -0500 Subject: [PATCH 1/4] timestamp set for dencun on mainnet, lfg. Signed-off-by: Justin Florentine --- config/src/main/resources/mainnet.json | 1 + 1 file changed, 1 insertion(+) diff --git a/config/src/main/resources/mainnet.json b/config/src/main/resources/mainnet.json index 645ddb09d47..ab35a5aba35 100644 --- a/config/src/main/resources/mainnet.json +++ b/config/src/main/resources/mainnet.json @@ -15,6 +15,7 @@ "grayGlacierBlock": 15050000, "terminalTotalDifficulty": 58750000000000000000000, "shanghaiTime": 1681338455, + "cancunTime": 1710338135, "ethash": { }, "discovery": { From 83504016594f79b87410d2483b919ecfb02a2f92 Mon Sep 17 00:00:00 2001 From: Justin Florentine Date: Thu, 8 Feb 2024 11:22:29 -0500 Subject: [PATCH 2/4] adds confirmed forkid Signed-off-by: Justin Florentine --- .../java/org/hyperledger/besu/ForkIdsNetworkConfigTest.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/besu/src/test/java/org/hyperledger/besu/ForkIdsNetworkConfigTest.java b/besu/src/test/java/org/hyperledger/besu/ForkIdsNetworkConfigTest.java index a6c0c4919c8..c6657345077 100644 --- a/besu/src/test/java/org/hyperledger/besu/ForkIdsNetworkConfigTest.java +++ b/besu/src/test/java/org/hyperledger/besu/ForkIdsNetworkConfigTest.java @@ -107,8 +107,9 @@ public static Collection parameters() { new ForkId(Bytes.ofUnsignedInt(0xb715077dL), 13773000L), new ForkId(Bytes.ofUnsignedInt(0x20c327fcL), 15050000L), new ForkId(Bytes.ofUnsignedInt(0xf0afd0e3L), 1681338455L), - new ForkId(Bytes.ofUnsignedInt(0xdce96c2dL), 0L), - new ForkId(Bytes.ofUnsignedInt(0xdce96c2dL), 0L)) + new ForkId(Bytes.ofUnsignedInt(0xdce96c2dL), 1710338135L), + new ForkId(Bytes.ofUnsignedInt(0x9f3d2254L), 0L), + new ForkId(Bytes.ofUnsignedInt(0x9f3d2254L), 0L)) }, new Object[] { NetworkName.MORDOR, From 90774d1e9cec3d276909a1f223a48c16c951e2f0 Mon Sep 17 00:00:00 2001 From: Justin Florentine Date: Thu, 8 Feb 2024 15:05:13 -0500 Subject: [PATCH 3/4] unit tests were re-initting Signed-off-by: Justin Florentine --- .../besu/evm/precompile/KZGPointEvalPrecompiledContract.java | 2 -- 1 file changed, 2 deletions(-) diff --git a/evm/src/main/java/org/hyperledger/besu/evm/precompile/KZGPointEvalPrecompiledContract.java b/evm/src/main/java/org/hyperledger/besu/evm/precompile/KZGPointEvalPrecompiledContract.java index 25968d67b1d..ded0da3ef5f 100644 --- a/evm/src/main/java/org/hyperledger/besu/evm/precompile/KZGPointEvalPrecompiledContract.java +++ b/evm/src/main/java/org/hyperledger/besu/evm/precompile/KZGPointEvalPrecompiledContract.java @@ -79,8 +79,6 @@ public static void init() { "Loading network trusted setup from classpath resource {}", trustedSetupResourceName); CKZG4844JNI.loadTrustedSetupFromResource( trustedSetupResourceName, KZGPointEvalPrecompiledContract.class); - } else { - throw new IllegalStateException("KZG trusted setup was already loaded"); } } From 5a539a052d6f4db1e5a7d35903adcae2492ca427 Mon Sep 17 00:00:00 2001 From: Justin Florentine Date: Thu, 8 Feb 2024 16:54:02 -0500 Subject: [PATCH 4/4] adds cancun to post-merge overrides Signed-off-by: Justin Florentine --- .../besu/ethereum/mainnet/DifficultyCalculatorTests.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ethereum/referencetests/src/reference-test/java/org/hyperledger/besu/ethereum/mainnet/DifficultyCalculatorTests.java b/ethereum/referencetests/src/reference-test/java/org/hyperledger/besu/ethereum/mainnet/DifficultyCalculatorTests.java index da9bcda0b14..fd2616a9c23 100644 --- a/ethereum/referencetests/src/reference-test/java/org/hyperledger/besu/ethereum/mainnet/DifficultyCalculatorTests.java +++ b/ethereum/referencetests/src/reference-test/java/org/hyperledger/besu/ethereum/mainnet/DifficultyCalculatorTests.java @@ -31,6 +31,8 @@ import java.io.IOException; import java.nio.charset.StandardCharsets; +import java.util.Collections; +import java.util.HashMap; import java.util.Map; import java.util.stream.Stream; @@ -46,12 +48,15 @@ public class DifficultyCalculatorTests { public static Stream getTestParametersForConfig() throws IOException { + Map postMergeOverrides = new HashMap<>(); + postMergeOverrides.put("shanghaiTime", "999999999999"); + postMergeOverrides.put("cancunTime","999999999999"); return Stream.of( Arguments.of( "/BasicTests/difficultyMainNetwork.json", MainnetProtocolSchedule.fromConfig( GenesisConfigFile.mainnet() - .getConfigOptions(Map.of("shanghaiTime", "999999999999")), + .getConfigOptions(postMergeOverrides), EvmConfiguration.DEFAULT)), Arguments.of( "/DifficultyTests/dfGrayGlacier/difficultyGrayGlacierForkBlock.json",