Skip to content

Commit

Permalink
wb | value plus voting profile
Browse files Browse the repository at this point in the history
  • Loading branch information
fmaste committed Dec 30, 2024
1 parent 26012f9 commit 68b944b
Show file tree
Hide file tree
Showing 9 changed files with 1,573 additions and 5 deletions.
7 changes: 7 additions & 0 deletions nix/workbench/analyse/chain-filters/epoch4+.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[ { "tag": "CSlot"
, "contents":
{ "tag": "EpochGEq"
, "contents": 3
}
}
]
7 changes: 7 additions & 0 deletions nix/workbench/analyse/chain-filters/epoch5+.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[ { "tag": "CSlot"
, "contents":
{ "tag": "EpochGEq"
, "contents": 4
}
}
]
6 changes: 6 additions & 0 deletions nix/workbench/profile/pparams/delta-voting.jq
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
def delta_voting:
{
"conway": {
"govActionDeposit": 100000
}
};
90 changes: 89 additions & 1 deletion nix/workbench/profile/prof1-variants.jq
Original file line number Diff line number Diff line change
Expand Up @@ -594,6 +594,13 @@ def all_profile_variants:
({}
| .genesis.pparamsOverlays = ["v10-preview"]
) as $costmodel_v10_preview
|
($genesis_voltaire
| .genesis.pparamsOverlays as $ovls
| .genesis.pparamsOverlays = $ovls + ["v10-preview", "voting"]
| .genesis.utxo_keys = 2
| .genesis.funds_balance = 40000000000000
) as $genesis_voting
##
### Definition vocabulary: node + tracer config variants
##
Expand Down Expand Up @@ -944,10 +951,20 @@ def all_profile_variants:
($nomad_perf_base * $nomad_perf_dense * $p2p * $genesis_voltaire
) as $valuevolt_nomadperf_template
|
# P&T Nomad cluster: 52 nodes, P2P by default - value+voting workload
# Extra splits, benchmarking from 5th epoch (skip 0,1,2,3 / 533 min / 8.88 hs)
($nomad_perf_base * $nomad_perf_dense * $p2p * $genesis_voting *
{analysis: { filters: ["epoch5+", "size-full"] } }
) as $valuevoting_nomadperf_template
|
# P&T Nomad cluster: 52 nodes, P2P by default - Plutus workload
($nomad_perf_plutus_base * $nomad_perf_dense * $p2p * $genesis_voltaire
) as $plutusvolt_nomadperf_template
|
# P&T Nomad cluster: 52 nodes, P2P by default - plutus+voting workload
($nomad_perf_plutus_base * $nomad_perf_dense * $p2p * $genesis_voting
) as $plutusvoting_nomadperf_template
|
# P&T Nomad cluster: 52 nodes, P2P by default - PlutusV3 BLST workload
($nomad_perf_plutusv3blst_base * $nomad_perf_dense * $p2p * $genesis_voltaire
) as $plutusv3blst_nomadperf_template
Expand Down Expand Up @@ -1304,6 +1321,74 @@ def all_profile_variants:
{ name: "plutus-volt-nomadperf"
}

## As "value" above with an extra voting workload
# Split creating 500k UTxO, create the transactions (build-raw) but no submit.
, $valuevoting_nomadperf_template * $dreps_large *
{ name: "value-voting-utxo-volt-nomadperf"
, generator: {drep_voting: true}
, workload: [
{ outs_per_split_transaction: 193
, submit_vote: false
}
]
}
# One vote per voting tx version.
, $valuevoting_nomadperf_template * $dreps_large *
{ name: "value-voting-volt-nomadperf"
, generator: {drep_voting: true}
, workload: [
{ outs_per_split_transaction: 193
, submit_vote: true
, votes_per_tx: 1
}
]
}
# Two votes per voting tx version.
, $valuevoting_nomadperf_template * $dreps_large *
{ name: "value-voting-double-volt-nomadperf"
, generator: {drep_voting: true}
, workload: [
{ outs_per_split_transaction: 193
, submit_vote: true
, votes_per_tx: 2
}
]
}

## As "plutus" above with an extra voting workload
# Split creating 500k UTxO, create the transactions (build-raw) but no submit.
, $plutusvoting_nomadperf_template * $dreps_large *
{ name: "plutus-voting-utxo-volt-nomadperf"
, generator: {drep_voting: true}
, workload: [
{ outs_per_split_transaction: 193
, submit_vote: false
}
]
}
# One vote per voting tx version.
, $plutusvoting_nomadperf_template * $dreps_large *
{ name: "plutus-voting-volt-nomadperf"
, generator: {drep_voting: true}
, workload: [
{ outs_per_split_transaction: 193
, submit_vote: true
, votes_per_tx: 1
}
]
}
# Two votes per voting tx version.
, $plutusvoting_nomadperf_template * $dreps_large *
{ name: "plutus-voting-double-volt-nomadperf"
, generator: {drep_voting: true}
, workload: [
{ outs_per_split_transaction: 193
, submit_vote: true
, votes_per_tx: 2
}
]
}

## P&T Nomad cluster: 52 nodes, PlutusV3 BLST and Plutus SECP workloads
, $plutusv3blst_nomadperf_template *
{ name: "plutusv3-blst-nomadperf"
Expand Down Expand Up @@ -1539,8 +1624,11 @@ def all_profile_variants:
}

## development profile for voting workload: PV9, Conway costmodel, 1000 DReps injected
, $cibench_base * $voting_base * $double_plus_tps_saturation_plutus * $genesis_voltaire * $dreps_small *
, $cibench_base * $voting_base * $double_plus_tps_saturation_plutus * $genesis_voting * $dreps_small *
{ name: "development-voting"
, workload: [
{votes_per_tx: 2}
]
}

## Last, but not least, the profile used by "nix-shell -A devops":
Expand Down
2 changes: 2 additions & 0 deletions nix/workbench/profile/prof2-pparams.jq
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import "delta-blocksizes" as blocksizes;
import "delta-v8-preview" as v8preview;
import "delta-v9-preview" as v9preview;
import "delta-v10-preview" as v10preview;
import "delta-voting" as voting;

def filterMapPParams(flt; map):
timeline::epochs
Expand All @@ -32,6 +33,7 @@ def overlays:
, "v9-preview": v9preview::delta
, "v10-preview": v10preview::delta
, "blocksize64k": blocksizes::delta_64kblocks
, "voting": voting::delta_voting
};

def pParamsWithOverlays(epoch; overlay_names):
Expand Down
18 changes: 18 additions & 0 deletions nix/workbench/service/generator.nix
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,24 @@ let
value = ''
#!${pkgs.stdenv.shell}
############################### VOTING ###############################
############################### VOTING ###############################
############################### VOTING ###############################
${if profile.generator.drep_voting or false
then
''
${import ./voting.nix {inherit pkgs profile nodeSpecs;}}
workflow_generator \
${if profile.composition.with_explorer then "explorer" else "node-0"}
''
else
''
''
}
############################### VOTING ###############################
############################### VOTING ###############################
############################### VOTING ###############################
${service.script}
'';
JSON = pkgs.writeScript "startup-generator.sh" value;
Expand Down
39 changes: 36 additions & 3 deletions nix/workbench/service/healthcheck.nix
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,14 @@ let
active_slots="$(${jq}/bin/jq --null-input -r \
"''${epoch_length} * ''${active_slots_coeff}" \
)"
with_explorer="$(${jq}/bin/jq .composition.with_explorer ../profile.json)"
${coreutils}/bin/echo "profile.json:"
${coreutils}/bin/echo "- network_magic: ''${network_magic}"
${coreutils}/bin/echo "- slot_duration: ''${slot_duration}"
${coreutils}/bin/echo "- epoch_length: ''${epoch_length}"
${coreutils}/bin/echo "- active_slots_coeff: ''${active_slots_coeff}"
${coreutils}/bin/echo "- active_slots: ''${active_slots}"
${coreutils}/bin/echo "- with_explorer: ''${with_explorer}"
# Fetch all defined node names (Including "explorer" nodes)
###########################################################
Expand Down Expand Up @@ -191,9 +193,26 @@ let
done
else
# Seconds supervisor needs to consider the start successful
${coreutils}/bin/sleep 5
msg "Done, bye!"
# Producers only!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
############################# VOTING #############################
############################# VOTING #############################
############################# VOTING #############################
# If running supervisord (local only), only one healthcheck is run
# for all nodes, so sending to background and sleeping forever all
# but the last node on the list fits all backends for all
# producers to vote simultaneously.
for node in ''${nodes[*]} # nodes array is only deployed nodes!
do
if test "''${node}" = "''${nodes[-1]}"
then
workflow_producer "''${node}"
else
workflow_producer "''${node}" &
fi
done
############################# VOTING #############################
############################# VOTING #############################
############################# VOTING #############################
fi
}
Expand Down Expand Up @@ -935,6 +954,20 @@ let
exit 22
}
######################################################################
# Conway/governance functions! #######################################
######################################################################
${if profile.generator.drep_voting or false
then
''
${import ./voting.nix {inherit pkgs profile nodeSpecs;}}
''
else
''
''
}
if test -n "''${NOMAD_DEBUG:-}"
then
DEBUG_FILE="$(${coreutils}/bin/dirname "$(${coreutils}/bin/readlink -f "$0")")"/"$0".debug
Expand Down
Loading

0 comments on commit 68b944b

Please sign in to comment.