Skip to content

Commit

Permalink
CAD-2515 bench | nodes: skip eras according to configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
deepfire committed Jan 19, 2021
1 parent 5482c79 commit 8f56555
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 1 deletion.
2 changes: 2 additions & 0 deletions bench/profile-definitions.jq
Expand Up @@ -229,6 +229,8 @@ def aux_profiles:
, { name: "smoke"
, generator: { tx_count: 100, add_tx_size: 0, inputs_per_tx: 1, outputs_per_tx: 1, tps: 100
, init_cooldown: 25, finish_patience: 4 }
, genesis:
{ genesis_future_offset: "9 minutes" }
}
, { name: "k1000-smoke"
, generator: { tx_count: 100, add_tx_size: 0, inputs_per_tx: 1, outputs_per_tx: 1, tps: 100
Expand Down
18 changes: 18 additions & 0 deletions roles/core.nix
Expand Up @@ -99,12 +99,30 @@ let
else if !(builtins.pathExists vrfKey) then RealPBFT
else lib.recursiveUpdate TPraos RealPBFT;
};
eraSkipConfig = era: {
services.cardano-node.nodeConfig =
({
shelley =
{ TestShelleyHardForkAtEpoch = 0;
};
allegra =
{ TestShelleyHardForkAtEpoch = 0;
TestAllegraHardForkAtEpoch = 0;
};
mary =
{ TestShelleyHardForkAtEpoch = 0;
TestAllegraHardForkAtEpoch = 0;
TestMaryHardForkAtEpoch = 0;
};
}).${era};
};

in {

imports = [
cardano-ops.modules.base-service
keysConfig.${globals.environmentConfig.nodeConfig.Protocol}
(eraSkipConfig globals.environmentConfig.generatorConfig.era)
];

users.users.cardano-node.extraGroups = [ "keys" ];
Expand Down
16 changes: 15 additions & 1 deletion roles/tx-generator.nix
Expand Up @@ -138,7 +138,21 @@ in {
"cardano.node-metrics" = [ "KatipBK" ];
};
};
});
} //
({
shelley =
{ TestShelleyHardForkAtEpoch = 0;
};
allegra =
{ TestShelleyHardForkAtEpoch = 0;
TestAllegraHardForkAtEpoch = 0;
};
mary =
{ TestShelleyHardForkAtEpoch = 0;
TestAllegraHardForkAtEpoch = 0;
TestMaryHardForkAtEpoch = 0;
};
}).${globals.environmentConfig.generatorConfig.era});
};

deployment.keys = {
Expand Down

0 comments on commit 8f56555

Please sign in to comment.