Skip to content

Commit

Permalink
workbench: add babbage era
Browse files Browse the repository at this point in the history
  • Loading branch information
deepfire committed May 16, 2022
1 parent bdbf1a9 commit 5862665
Show file tree
Hide file tree
Showing 9 changed files with 25 additions and 12 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
PROJECT_NAME = cardano-node
NUM_PROC = $(nproc --all)

## One of: shey alra mary alzo
ERA ?= alzo
## One of: shey alra mary alzo bage
ERA ?= bage

CLUSTER_PROFILE ?= default-${ERA}
ifneq "${CLUSTER_PROFILE}" "default-${ERA}"
Expand Down
4 changes: 2 additions & 2 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -274,14 +274,14 @@
(pkgs.supervisord-workbench-for-profile
{
inherit supervisord-workbench;
profileName = "smoke-alzo";
profileName = "smoke-bage";
}
).profile-run { trace = true; };
workbench-ci-test =
(pkgs.supervisord-workbench-for-profile
{
inherit supervisord-workbench;
profileName = "k6-600slots-1000kU-1000kD-64kbs-10tps-fixed-loaded-alzo";
profileName = "k6-600slots-1000kU-1000kD-64kbs-10tps-fixed-loaded-bage";
}
).profile-run { };
workbench-smoke-analysis = workbench-smoke-test.analysis;
Expand Down
2 changes: 1 addition & 1 deletion nix/custom-config.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ self: {
cacheDir = "${self.localCluster.stateDir}/.cache";
stateDir = "run/current";
batchName = "plain";
profileName = "default-alzo";
profileName = "default-bage";
basePort = 30000;
autoStartCluster = false;
autoStartClusterArgs = "";
Expand Down
9 changes: 5 additions & 4 deletions nix/nixos/tx-generator-service.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ let
targetNodes = targetNodesList cfg.targetNodes;
era = capitalise cfg.era;
plutusLoopScript = plutusScriptFile cfg "loop.plutus";
inherit
inherit
plutusMode
plutusData
plutusRedeemer
Expand All @@ -21,7 +21,7 @@ let
tx_fee
tps
init_cooldown
sigKey
sigKey
min_utxo_value
nodeConfigFile
localNodeSocketPath;
Expand All @@ -37,7 +37,7 @@ let
(if runScript != null
then runScript
else runScriptFn cfg);

capitalise = x: (pkgs.lib.toUpper (__substring 0 1 x)) + __substring 1 99999 x;

plutusScript = cfg: plutusScriptFile cfg cfg.plutusScript;
Expand Down Expand Up @@ -105,6 +105,7 @@ in pkgs.commonLib.defServiceModule
"allegra"
"mary"
"alonzo"
"babbage"
])
"mary"
"Cardano era to generate transactions for.";
Expand All @@ -113,7 +114,7 @@ in pkgs.commonLib.defServiceModule
decideRunScript = opt (functionTo str) defaultDecideRunScript
"Decision procedure for the run script content.";
};

configExeArgsFn = cfg: [
"json_highlevel"
"${pkgs.writeText "tx-gen-config.json" (cfg.decideRunScript cfg)}"
Expand Down
1 change: 1 addition & 0 deletions nix/workbench/profile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ global_profile_eras=(
allegra
mary
alonzo
babbage
)

profile() {
Expand Down
6 changes: 5 additions & 1 deletion nix/workbench/profiles/defaults.jq
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## Testable with:
##
## jq -n 'include "defaults" { search: "nix/workbench/profiles" }; era_defaults("alonzo")'
## jq -n 'include "defaults" { search: "nix/workbench/profiles" }; era_defaults("babbage")'
##
def era_defaults($era):
{ common:
Expand Down Expand Up @@ -104,4 +104,8 @@ def era_defaults($era):
, alonzo:
{
}

, babbage:
{
}
} | (.common * .[$era]);
7 changes: 7 additions & 0 deletions nix/workbench/profiles/node-services.nix
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,13 @@ let
TestMaryHardForkAtEpoch = 0;
TestAlonzoHardForkAtEpoch = 0;
};
babbage =
{ TestShelleyHardForkAtEpoch = 0;
TestAllegraHardForkAtEpoch = 0;
TestMaryHardForkAtEpoch = 0;
TestAlonzoHardForkAtEpoch = 0;
TestBabbageHardForkAtEpoch = 0;
};
}.${profile.value.era};
};
in
Expand Down
2 changes: 1 addition & 1 deletion nix/workbench/supervisor-run.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
let
batchNameDefault = "plain";
profileNameDefault = "default-alzo";
profileNameDefault = "default-bage";
in

{ pkgs
Expand Down
2 changes: 1 addition & 1 deletion shell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ let

devops =
let cluster = pkgs.supervisord-workbench-for-profile
{ profileName = "devops-alzo";
{ profileName = "devops-bage";
useCabalRun = false;
};
in cardanoNodeProject.shellFor {
Expand Down

0 comments on commit 5862665

Please sign in to comment.