From 9790041c1abb9fb1476e88ca1ae4e6e3a40894b0 Mon Sep 17 00:00:00 2001 From: Kosyrev Serge Date: Mon, 16 May 2022 17:03:02 +0300 Subject: [PATCH] workbench: add babbage era --- Makefile | 4 ++-- nix/custom-config.nix | 2 +- nix/nixos/tx-generator-service.nix | 9 +++++---- nix/workbench/profile.sh | 1 + nix/workbench/profiles/defaults.jq | 6 +++++- nix/workbench/profiles/node-services.nix | 7 +++++++ nix/workbench/supervisor-run.nix | 2 +- shell.nix | 2 +- 8 files changed, 23 insertions(+), 10 deletions(-) diff --git a/Makefile b/Makefile index 970c4887bb4..9f7dd6e2d90 100644 --- a/Makefile +++ b/Makefile @@ -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}" diff --git a/nix/custom-config.nix b/nix/custom-config.nix index 4c5c5864902..57c13d3cb20 100644 --- a/nix/custom-config.nix +++ b/nix/custom-config.nix @@ -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 = ""; diff --git a/nix/nixos/tx-generator-service.nix b/nix/nixos/tx-generator-service.nix index e49fda849e1..4a44b609bc5 100644 --- a/nix/nixos/tx-generator-service.nix +++ b/nix/nixos/tx-generator-service.nix @@ -6,7 +6,7 @@ let targetNodes = targetNodesList cfg.targetNodes; era = capitalise cfg.era; plutusLoopScript = plutusScriptFile cfg "loop.plutus"; - inherit + inherit plutusMode plutusData plutusRedeemer @@ -21,7 +21,7 @@ let tx_fee tps init_cooldown - sigKey + sigKey min_utxo_value nodeConfigFile localNodeSocketPath; @@ -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; @@ -105,6 +105,7 @@ in pkgs.commonLib.defServiceModule "allegra" "mary" "alonzo" + "babbage" ]) "mary" "Cardano era to generate transactions for."; @@ -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)}" diff --git a/nix/workbench/profile.sh b/nix/workbench/profile.sh index 65f0bead1cd..c33a66d481d 100644 --- a/nix/workbench/profile.sh +++ b/nix/workbench/profile.sh @@ -17,6 +17,7 @@ global_profile_eras=( allegra mary alonzo + babbage ) profile() { diff --git a/nix/workbench/profiles/defaults.jq b/nix/workbench/profiles/defaults.jq index 5546fe5d8a3..dbaba8b9ab4 100644 --- a/nix/workbench/profiles/defaults.jq +++ b/nix/workbench/profiles/defaults.jq @@ -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: @@ -104,4 +104,8 @@ def era_defaults($era): , alonzo: { } + +, babbage: + { + } } | (.common * .[$era]); diff --git a/nix/workbench/profiles/node-services.nix b/nix/workbench/profiles/node-services.nix index 248fe59a2c4..a2500ffb79e 100644 --- a/nix/workbench/profiles/node-services.nix +++ b/nix/workbench/profiles/node-services.nix @@ -132,6 +132,13 @@ let TestMaryHardForkAtEpoch = 0; TestAlonzoHardForkAtEpoch = 0; }; + babbage = + { TestShelleyHardForkAtEpoch = 0; + TestAllegraHardForkAtEpoch = 0; + TestMaryHardForkAtEpoch = 0; + TestAlonzoHardForkAtEpoch = 0; + TestBabbageHardForkAtEpoch = 0; + }; }.${profile.value.era}; }; in diff --git a/nix/workbench/supervisor-run.nix b/nix/workbench/supervisor-run.nix index 36c5b6f2b4d..b75bb9dc9e5 100644 --- a/nix/workbench/supervisor-run.nix +++ b/nix/workbench/supervisor-run.nix @@ -1,6 +1,6 @@ let batchNameDefault = "plain"; - profileNameDefault = "default-alzo"; + profileNameDefault = "default-bage"; in { pkgs diff --git a/shell.nix b/shell.nix index 3285203e9fe..6f44efce3e1 100644 --- a/shell.nix +++ b/shell.nix @@ -130,7 +130,7 @@ let devops = let cluster = pkgs.supervisord-workbench-for-profile - { profileName = "devops-alzo"; + { profileName = "devops-bage"; useCabalRun = false; }; in cardanoNodeProject.shellFor {