From 3ab4d9b9a0f2b3c22a7ec41f4200c048e78ff38c Mon Sep 17 00:00:00 2001 From: Stefan Bratanov Date: Fri, 20 Oct 2023 17:28:32 +0100 Subject: [PATCH] kzgnoop when starting TestDefinition --- .../forkchoice/ForkChoiceTestExecutor.java | 2 +- .../teku/ethtests/finder/TestDefinition.java | 16 ++++++++++++---- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/eth-reference-tests/src/referenceTest/java/tech/pegasys/teku/reference/phase0/forkchoice/ForkChoiceTestExecutor.java b/eth-reference-tests/src/referenceTest/java/tech/pegasys/teku/reference/phase0/forkchoice/ForkChoiceTestExecutor.java index ffaf775700f..37c7698ca27 100644 --- a/eth-reference-tests/src/referenceTest/java/tech/pegasys/teku/reference/phase0/forkchoice/ForkChoiceTestExecutor.java +++ b/eth-reference-tests/src/referenceTest/java/tech/pegasys/teku/reference/phase0/forkchoice/ForkChoiceTestExecutor.java @@ -112,7 +112,7 @@ public void runTest(final TestDefinition testDefinition) throws Throwable { // tests actually have one, so we currently don't bother trying to load it. final BeaconState anchorState = TestDataUtils.loadStateFromSsz(testDefinition, "anchor_state" + SSZ_SNAPPY_EXTENSION); - final Spec spec = testDefinition.getSpec(); + final Spec spec = testDefinition.getSpec(false); final SignedBeaconBlock anchorBlock = loadAnchorBlock(testDefinition); final StorageSystem storageSystem = diff --git a/eth-tests/src/main/java/tech/pegasys/teku/ethtests/finder/TestDefinition.java b/eth-tests/src/main/java/tech/pegasys/teku/ethtests/finder/TestDefinition.java index 9973f0da24f..56161904ad5 100644 --- a/eth-tests/src/main/java/tech/pegasys/teku/ethtests/finder/TestDefinition.java +++ b/eth-tests/src/main/java/tech/pegasys/teku/ethtests/finder/TestDefinition.java @@ -56,13 +56,17 @@ public String getFork() { } public Spec getSpec() { + return getSpec(true); + } + + public Spec getSpec(final boolean kzgNoop) { if (spec == null) { - createSpec(); + createSpec(kzgNoop); } return spec; } - private void createSpec() { + private void createSpec(final boolean kzgNoop) { final Eth2Network network = switch (configName) { case TestSpecConfig.MAINNET -> Eth2Network.MAINNET; @@ -82,10 +86,14 @@ private void createSpec() { TestSpecFactory.create( highestSupportedMilestone, network, - configBuilder -> configBuilder.denebBuilder(denebConfigModifier(network))); + configBuilder -> { + if (!kzgNoop) { + configBuilder.denebBuilder(denebConfigKzgModifier(network)); + } + }); } - private Consumer denebConfigModifier(final Eth2Network network) { + private Consumer denebConfigKzgModifier(final Eth2Network network) { return builder -> { final String trustedSetupFilename = network.equals(Eth2Network.MAINNET)