diff --git a/CODEOWNERS b/CODEOWNERS index 7ce4fbe3320..a82afd027fd 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -19,15 +19,15 @@ cabal.project @Jimbo4350 @newhog doc @docs-access README.* @docs-access -bench/tx-generator @Jimbo4350 @newhoggy @deepfire @MarcFontaine -bench @Jimbo4350 @newhoggy @deepfire @denisshevchenko @jutaro @MarcFontaine @mgmeier @cleverca22 +bench/tx-generator @Jimbo4350 @newhoggy @deepfire @mgmeier @MarcFontaine +bench @Jimbo4350 @newhoggy @deepfire @denisshevchenko @jutaro @MarcFontaine @mgmeier @fmaste @cleverca22 cardano-tracer @Jimbo4350 @newhoggy @deepfire @denisshevchenko -nix/workbench @Jimbo4350 @newhoggy @deepfire @denisshevchenko @jutaro @MarcFontaine @mgmeier +nix/workbench @Jimbo4350 @newhoggy @deepfire @denisshevchenko @jutaro @MarcFontaine @mgmeier @fmaste trace-dispatcher @Jimbo4350 @newhoggy @deepfire @denisshevchenko @jutaro @mgmeier trace-forward @Jimbo4350 @newhoggy @deepfire @denisshevchenko @jutaro @mgmeier trace-resources @Jimbo4350 @newhoggy @deepfire @denisshevchenko @jutaro @mgmeier -Makefile @Jimbo4350 @newhoggy @deepfire @mgmeier -*.mk @Jimbo4350 @newhoggy @deepfire @mgmeier +Makefile @Jimbo4350 @newhoggy @deepfire @mgmeier @fmaste +*.mk @Jimbo4350 @newhoggy @deepfire @mgmeier @fmaste .buildkite @Jimbo4350 @newhoggy @devops .github @Jimbo4350 @newhoggy @devops diff --git a/Makefile b/Makefile index cf919ea27da..d3ea5f1791f 100644 --- a/Makefile +++ b/Makefile @@ -12,6 +12,7 @@ ERA ?= bage PROFILE ?= default-${ERA} REV ?= master +ITER ?= ARGS ?= CMD ?= RUN ?= @@ -65,12 +66,13 @@ ps: ## Plain-text list of profiles ## ## Profile-based cluster shells (autogenerated targets) ## -PROFILES_BASE := default plutus +PROFILES_BASE := default plutus oldtracing PROFILES_STARTSTOP := startstop startstop-p2p startstop-plutus startstop-notracer startstop-oldtracing PROFILES_CI_TEST := ci-test ci-test-p2p ci-test-plutus ci-test-notracer PROFILES_CI_BENCH := ci-bench ci-bench-p2p ci-bench-plutus ci-bench-notracer PROFILES_10 := 10 10-p2p 10-plutus 10-notracer PROFILES_FORGE_STRESS := forge-stress forge-stress-p2p forge-stress-plutus forge-stress-plutus-singleton forge-stress-notracer +PROFILES_FORGE_STRESS_PRE := forge-stress-pre forge-stress-pre-plutus forge-stress-pre-notracer PROFILES_CHAINSYNC := chainsync-early-byron chainsync-early-byron-notracer chainsync-early-byron-oldtracing PROFILES_CHAINSYNC += chainsync-early-alonzo chainsync-early-alonzo-notracer chainsync-early-alonzo-oldtracing chainsync-early-alonzo-p2p PROFILES_VENDOR := dish dish-plutus dish-10M dish-10M-plutus @@ -81,6 +83,7 @@ SHELL_PROFILES += $(PROFILES_CI_TEST) SHELL_PROFILES += $(PROFILES_CI_BENCH) SHELL_PROFILES += $(PROFILES_10) SHELL_PROFILES += $(PROFILES_FORGE_STRESS) +SHELL_PROFILES += $(PROFILES_FORGE_STRESS_PRE) SHELL_PROFILES += $(PROFILES_CHAINSYNC) SHELL_PROFILES += $(PROFILES_VENDOR) diff --git a/lib.mk b/lib.mk index e66fff6e8bb..637ce286987 100644 --- a/lib.mk +++ b/lib.mk @@ -12,10 +12,10 @@ ifeq ($(7),true) $(1): ARGS += --arg 'profiled' true endif ifeq ($(5)$(6),truetrue) -$(1): CMD := start-cluster; return +$(1): CMD := start-cluster $(if ${ITER},--iterations ${ITER}); return endif ifeq ($(5)$(6),truefalse) -$(1): RUN := start-cluster +$(1): RUN := start-cluster $(if ${ITER},--iterations ${ITER}) endif ifeq ($(3)$(4)$(5)$(6),falsetruefalsefalse) define EXTRA_HELP += diff --git a/nix.mk b/nix.mk index c17af994ff0..55214da36a4 100644 --- a/nix.mk +++ b/nix.mk @@ -15,4 +15,4 @@ membench-5-at: ## Membench: 5 iterations, set commit by: make membench-5-at RE workbench-ci-test smoke: ## Workbench: test a-la Hydra, the ci-test profile, full Nix engaged nix build --out-link result-ci-test '.#hydraJobsPr.linux.native.workbench-ci-test' --cores 0 - mv result-ci-test run/`jq -r .meta.tag result-ci-test/meta.json` + ID=`jq -r .meta.tag result-ci-test/meta.json`; test -e "run/$$ID" || mv result-ci-test "run/$$ID" diff --git a/nix/workbench/analyse.sh b/nix/workbench/analyse.sh index aa90f822996..8593ce13801 100644 --- a/nix/workbench/analyse.sh +++ b/nix/workbench/analyse.sh @@ -418,7 +418,55 @@ analysis_config_extract_legacy_tracing() { let f = __fromJSON (__readFile "'$file'"); in with f; __toJSON - { inherit rotation; + { inherit + TraceAcceptPolicy + TraceBlockFetchClient + TraceBlockFetchDecisions + TraceBlockFetchProtocol + TraceBlockFetchProtocolSerialised + TraceBlockFetchServer + TraceChainDb + TraceChainSyncBlockServer + TraceChainSyncClient + TraceChainSyncHeaderServer + TraceChainSyncProtocol + TraceConnectionManager + TraceDNSResolver + TraceDNSSubscription + TraceDiffusionInitialization + TraceErrorPolicy + TraceForge + TraceHandshake + TraceInboundGovernor + TraceIpSubscription + TraceLedgerPeers + TraceLocalChainSyncProtocol + TraceLocalErrorPolicy + TraceLocalHandshake + TraceLocalRootPeers + TraceLocalTxSubmissionProtocol + TraceLocalTxSubmissionServer + TraceMempool + TraceMux + TracePeerSelection + TracePeerSelectionActions + TracePublicRootPeers + TraceServer + TraceTxInbound + TraceTxOutbound + TraceTxSubmissionProtocol + TracingVerbosity + TurnOnLogMetrics + TurnOnLogging + defaultBackends + defaultScribes + hasEKG + hasPrometheus + minSeverity + options + rotation + setupBackends + setupScribes; }' ) nix eval "${nix_eval_args[@]}" | jq --sort-keys diff --git a/nix/workbench/genesis.sh b/nix/workbench/genesis.sh index 63e233f5962..8dca7cef190 100644 --- a/nix/workbench/genesis.sh +++ b/nix/workbench/genesis.sh @@ -200,13 +200,14 @@ case "$op" in msg "genesis: removing delegator keys.." rm "$dir"/stake-delegator-keys -rf - cat <<<$cache_key_input > "$dir"/cache.key.input - cat <<<$cache_key > "$dir"/cache.key - cat <<<$global_genesis_format_version > "$dir"/layout.version - msg "genesis: moving keys" ## TODO: try to get rid of this step: - Massage_the_key_file_layout_to_match_AWS "$profile_json" "$node_specs" "$dir";; + Massage_the_key_file_layout_to_match_AWS "$profile_json" "$node_specs" "$dir" + + msg "genesis: sealing" + cat <<<$cache_key_input > "$dir"/cache.key.input + cat <<<$cache_key > "$dir"/cache.key + cat <<<$global_genesis_format_version > "$dir"/layout.version;; derive-from-cache ) local usage="USAGE: wb genesis $op PROFILE-OUT TIMING-JSON-EXPR CACHE-ENTRY-DIR OUTDIR" diff --git a/nix/workbench/lib-cabal.sh b/nix/workbench/lib-cabal.sh index fad4d7fde3e..d8a88315814 100644 --- a/nix/workbench/lib-cabal.sh +++ b/nix/workbench/lib-cabal.sh @@ -1,4 +1,3 @@ -echo 'lib-cabal args: '"$*" progress "workbench" "cabal-inside-nix-shell mode enabled, calling cardano-* via '$(white cabal run)' (instead of using Nix store); $(red lib-cabal.sh) flags: $(yellow $*)" if test ! -v WB_PROFILED; then export WB_PROFILED= ; fi diff --git a/nix/workbench/profiles/prof1-variants.jq b/nix/workbench/profiles/prof1-variants.jq index 50a92aec63a..c4b04a89068 100644 --- a/nix/workbench/profiles/prof1-variants.jq +++ b/nix/workbench/profiles/prof1-variants.jq @@ -298,6 +298,13 @@ def all_profile_variants: ($scenario_fixed_loaded * $doublet * $dataset_miniature * $for_15blk * { desc: "Miniature dataset, CI-friendly duration, bench scale" }) as $cibench_base + | + ($scenario_fixed_loaded * $doublet * $dataset_oct2021 * + { node: + { shutdown_on_slot_synced: 2400 + } + , desc: "Oct 2021 dataset size, honest four epochs." + }) as $forge_stress_pre_base | ($scenario_fixed_loaded * $doublet * $dataset_status_quo * { node: @@ -351,6 +358,10 @@ def all_profile_variants: { name: "plutus" , desc: "Default with Plutus workload" } + , $old_tracing * + { name: "oldtracing" + , desc: "Default in legacy tracing mode" + } ## Fastest -- start-stop , $startstop_base * @@ -448,6 +459,16 @@ def all_profile_variants: { name: "forge-stress-notracer" } + , $forge_stress_pre_base * + { name: "forge-stress-pre" + } + , $forge_stress_pre_base * $plutus * + { name: "forge-stress-pre-plutus" + } + , $forge_stress_pre_base * $without_tracer * + { name: "forge-stress-pre-notracer" + } + , $scenario_chainsync * $chaindb_early_byron * { name: "chainsync-early-byron" } diff --git a/nix/workbench/run.sh b/nix/workbench/run.sh index 56c30bef479..e65ca7e598e 100644 --- a/nix/workbench/run.sh +++ b/nix/workbench/run.sh @@ -318,6 +318,8 @@ case "$op" in --* ) msg "FATAL: unknown flag '$1'"; usage_run;; * ) break;; esac; shift; done + local node_specs="$profile"/node-specs.json + if profile has-preset "$profile"/profile.json then preset=$(profile json "$profile"/profile.json | jq '.preset' -r) progress "run" "allocating from preset '$preset'" @@ -330,7 +332,6 @@ case "$op" in local hash=$(jq '."cardano-node" | .[:5]' -r <<<$manifest) ## 1. compute cluster composition - local node_specs=$(profile node-specs "$profile"/profile.json) ## 2. genesis cache entry population progress "run | genesis" "cache entry: $(if test -n "$genesis_cache_entry"; then echo pre-supplied; else echo preparing a new one..; fi)" @@ -378,14 +379,12 @@ case "$op" in then test "$(jq -r .name $profile/profile.json)" = "$profile_name" || fatal "profile | allocate incoherence: --profile $profile/profile.json mismatches '$profile_name'" - ln -s "$profile" "$dir"/profile - cp "$profile"/profile.json "$dir"/profile.json + ln -s "$profile" "$dir"/profile + cp "$profile"/profile.json "$dir"/profile.json + cp "$profile"/node-specs.json "$dir"/node-specs.json else - profile has-profile "$profile_name" || - fatal "no such profile: $profile_name" - profile json "$profile_name" > "$dir"/profile.json + fail "Mode no longer supported: operation without profile/ directory." fi - jq '.' <<<$node_specs > "$dir"/node-specs.json local args=( --arg tag "$tag" diff --git a/nix/workbench/topology.sh b/nix/workbench/topology.sh index 7b297235c56..75859e8a79a 100644 --- a/nix/workbench/topology.sh +++ b/nix/workbench/topology.sh @@ -96,7 +96,7 @@ case "${op}" in local usage="USAGE: wb topology density-map NODE-SPECS-JSON" local node_specs_json=${1:?$usage} - args=(--slurpfile node_specs "$node_specs" + args=(--slurpfile node_specs "$node_specs_json" --null-input --compact-output ) jq ' $node_specs[0] diff --git a/nix/workbench/wb b/nix/workbench/wb index f18c0ed7861..adf1b657432 100755 --- a/nix/workbench/wb +++ b/nix/workbench/wb @@ -155,9 +155,10 @@ start() profile_name=${profile_name:-$(jq '.name' -r $profile/profile.json)} analysis_type=$(jq '.analysis.type' -r $profile/profile.json) - progress "top-level" "iterations of profile $(with_color 'yellow' $profile_name): $(with_color 'white' $iterations)" - for ((i=0; i<$iterations; i++)) - do local args=( + local top_i + for ((top_i=0; top_i<$iterations; top_i++)) + do progress "top-level" "profile $(with_color 'yellow' $profile_name), iteration $(with_color 'white' $((top_i+1))) of $(with_color 'yellow' $iterations)" + local args=( ${run_allocate_args[@]} --manifest "$(manifest collect-from-checkout "$node_source" $node_rev)" ) @@ -172,7 +173,8 @@ start() if test -n "$no_analysis" -o $analysis_type = null; then continue; fi progress "top-level | analysis" "analysis type $(with_color yellow $analysis_type) on $(with_color white $tag)" - analyse ${analyse_args[@]} $analysis_type $tag || + analyse ${analyse_args[@]} $analysis_type $tag && + progress "run | analysis" "done" || if test -n "$analysis_can_fail" -a -z "$no_retry_failed_runs" then progress "run | analysis" "log processing failed, but --analysis-can-fail prevents failure: $(with_color red $tag)" iterations=$((iterations + 1))