|
330 | 330 | test -f "$dir"/profile.json -a -f "$dir"/genesis-shelley.json ||
|
331 | 331 | run fix-legacy-run-structure "$run";;
|
332 | 332 |
|
333 |
| - fix-systemstart ) |
334 |
| - local usage="USAGE: wb run $op RUN [MACH=node-1]" |
335 |
| - local run=${1:?$usage} |
336 |
| - local mach=${2:-node-0} |
337 |
| - local dir=$(run compute-path "$run") |
338 |
| - local nodelog=$(ls $dir/logs/$mach/node-*.json | head -n1) |
339 |
| - local genesis=$dir/genesis-shelley.json |
340 |
| - |
341 |
| - msg "cross-checking systemStart of $run: $nodelog" |
342 |
| - local apparent_systemStart=$(grep -F 'TraceStartLeadershipCheck' $nodelog | |
343 |
| - head -n2 | |
344 |
| - tail -n1 | |
345 |
| - jq '[ (.at | "\(.[:19])Z" | fromdateiso8601) |
346 |
| - , .data.slot |
347 |
| - ] | .[0] - .[1] |
348 |
| - | todateiso8601' -r) |
349 |
| - local genesis_systemStart=$(jq .systemStart $genesis -r) |
350 |
| - |
351 |
| - if test "$genesis_systemStart" != "$apparent_systemStart" |
352 |
| - then msg "Fixing genesis systemStart in $run: $apparent_systemStart (log), $genesis_systemStart (genesis)" |
353 |
| - jq_fmutate "$dir"/genesis-shelley.json '. * |
354 |
| - { systemStart: $systemStart |
355 |
| - } |
356 |
| - ' --arg systemStart $apparent_systemStart |
357 |
| - else msg "Good: both genesis and log-implied systemStart are at: $genesis_systemStart" |
358 |
| - fi;; |
359 |
| - |
360 | 333 | get-path | get )
|
361 | 334 | local usage="USAGE: wb run $op [--query] RUN"
|
362 | 335 | local check_args=()
|
|
588 | 561 | profile describe "$dir"/profile.json
|
589 | 562 | ;;
|
590 | 563 |
|
591 |
| - allocate-from-machine-run-slice | alloc-from-mrs ) |
592 |
| - local usage="USAGE: wb run $op MACH RUN-SLICE-ID PRESET" |
593 |
| - local mach=${1:?$usage}; shift |
594 |
| - local run_slice_id=${1:?$usage}; shift |
595 |
| - local preset=${1:?$usage}; shift |
596 |
| - |
597 |
| - local args=( |
598 |
| - --arg id $run_slice_id |
599 |
| - --arg mach $mach |
600 |
| - --arg preset $preset |
601 |
| - ) |
602 |
| - local meta=$(jq ' |
603 |
| - { Y: $id[0:4], M: $id[4:6], D: $id[6:8] } as $d |
604 |
| - | { h: $id[8:10], m: $id[10:12], s: $id[12:14] } as $t |
605 |
| - | { tag: "\($d.Y)-\($d.M)-\($d.D)-\($t.h).\($t.m).\($mach)" |
606 |
| - , profile: $preset |
607 |
| - , date: "\($d.Y)-\($d.M)-\($d.D)T\($t.h):\($t.m):\($t.s)Z" |
608 |
| - , batch: $mach |
609 |
| - } |
610 |
| - | . + |
611 |
| - { timestamp: (.date | fromdateiso8601) |
612 |
| - } |
613 |
| - | { meta: . } |
614 |
| - ' "${args[@]}" --null-input) |
615 |
| - local run=$(jq '.meta.tag' -r <<<$meta) |
616 |
| - local dir="$global_rundir"/$run |
617 |
| - |
618 |
| - mkdir -p "$dir"/$mach |
619 |
| - local genesis=$(profile preset-get-file "$preset" 'genesis' 'genesis/genesis-shelley.json') |
620 |
| - cp -f "$genesis" "$dir"/genesis-shelley.json |
621 |
| - ln -sf genesis-shelley.json "$dir"/genesis.json |
622 |
| - jq <<<$meta ' |
623 |
| - $gsisf[0] as $gsis |
624 |
| - | . * |
625 |
| - { meta: |
626 |
| - { profile_content: |
627 |
| - { genesis: |
628 |
| - { active_slots_coeff: $gsis.activeSlotsCoeff |
629 |
| - , delegators: 1000000 |
630 |
| - , dense_pool_density: 1 |
631 |
| - , epoch_length: $gsis.epochLength |
632 |
| - , parameter_k: $gsis.securityParam |
633 |
| - , n_pools: 1 |
634 |
| - , slot_duration: $gsis.slotLength |
635 |
| - , utxo: 4000000 |
636 |
| - } |
637 |
| - , generator: |
638 |
| - { add_tx_size: 0 |
639 |
| - , inputs_per_tx: 1 |
640 |
| - , outputs_per_tx: 1 |
641 |
| - , tps: 8 |
642 |
| - , tx_count: 0 |
643 |
| - , era: "alonzo" |
644 |
| - } |
645 |
| - } |
646 |
| - } |
647 |
| - } |
648 |
| - ' --slurpfile gsisf "$dir"/genesis-shelley.json > "$dir"/meta.json |
649 |
| - |
650 |
| - echo $dir;; |
651 |
| - |
652 | 564 | fetch-run | fetch | fr )
|
653 |
| - local usage="USAGE: wb run $op RUN [MACHINE]" |
| 565 | + local usage="USAGE: wb run $op RUN" |
654 | 566 | local run=${1:?$usage}
|
655 |
| - local mach=${2:-all-hosts} |
656 | 567 |
|
657 | 568 | local env=$( jq <<<$remote '.env' -r)
|
658 | 569 | local depl=$(jq <<<$remote '.depl' -r)
|
|
674 | 585 | '
|
675 | 586 |
|
676 | 587 | common-run-files
|
677 |
| - $mach |
678 | 588 | )
|
679 | 589 | run_remote_get "${args[@]}";;
|
680 | 590 |
|
@@ -909,9 +819,8 @@ run_remote_get() {
|
909 | 819 | generator/plutus-budget-summary.json
|
910 | 820 | )
|
911 | 821 | local xs0=(${objects[*]})
|
912 |
| - local xs1=(${xs0[*]/#all-hosts/ $(jq -r '.hostname | keys | .[]' <<<$meta)}) |
913 |
| - local xs2=(${xs1[*]/#common-run-files/ ${common_run_files[*]}}) |
914 |
| - local xs=(${xs2[*]}) |
| 822 | + local xs1=(${xs0[*]/#common-run-files/ ${common_run_files[*]}}) |
| 823 | + local xs=(${xs1[*]}) |
915 | 824 |
|
916 | 825 | local count=${#xs[*]}
|
917 | 826 | progress "run | fetch $(white $run)" "objects to fetch: $(white $count) total: ${objects[*]}"
|
|
0 commit comments