Skip to content

Commit

Permalink
kzgnoop when starting TestDefinition
Browse files Browse the repository at this point in the history
  • Loading branch information
StefanBratanov committed Oct 20, 2023
1 parent 00b2227 commit 3ab4d9b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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<DenebBuilder> denebConfigModifier(final Eth2Network network) {
private Consumer<DenebBuilder> denebConfigKzgModifier(final Eth2Network network) {
return builder -> {
final String trustedSetupFilename =
network.equals(Eth2Network.MAINNET)
Expand Down

0 comments on commit 3ab4d9b

Please sign in to comment.