Skip to content

ci(testnet): resource sampling and a nodes input for testnet and robustness - #68

Merged
EnzinoBB merged 5 commits into
masterfrom
ci/resource-sampler
Oct 23, 2026
Merged

EnzinoBB merged 5 commits into
masterfrom
ci/resource-sampler

Conversation

@EnzinoBB

Copy link
Copy Markdown
Collaborator

Step 1 of the plan for testing smart contracts and sizing the test machine. This PR measures what a private network uses, and adds a way to choose how many nodes it has.

  • ci/testnet/sampler.py (new, standard library only). Every SAMPLE_SECONDS (default 60, 0 = off) it records into resources.tsv:

    • host memory, swap, CPU busy and steal, load and disk;
    • the RSS, CPU and thread count of each node, each executor JVM and each harness script.

    On SIGTERM it writes a summary: peaks, sums of RSS, block rate, spread between nodes, and samples with a node down. It never fails a run.

  • run.sh:

    • NODES must be odd, 5 to 25, with a warning above 15, since max_neighbours=16 means no full mesh beyond that;
    • the main loop writes progress (t, min and max sequence);
    • stop_all stops the sampler first, so its last sample still sees the nodes, and prints the summary at the end of the log.
  • testnet.yml:

    • nodes input (5 to 15), checked before the build;
    • job name shows the node count;
    • the summary goes into the step summary, and the resources files into the artifact.
  • robustness.yml:

    • nodes and timeout_min inputs; scenarios with a NODE_STORAGE layout run only at 7 nodes;
    • longer job timeouts, which cost nothing when unused;
    • contracts.log, the node log files and the resources files in the artifact; the summary in the step summary.

Validation: the testnet label (7 nodes), a testnet dispatch with nodes=9, and robustness with only=rocksdb-crash. The last one checks that the summary counts n6's restarts.

🤖 Generated with Claude Code

EnzinoBB and others added 2 commits October 22, 2026 11:49
…estnet and robustness

- ci/testnet/sampler.py: every SAMPLE_SECONDS (default 60) host memory, swap, CPU busy/steal,
  load, disk, and RSS/CPU/threads of each node, executor JVM and harness script, into
  resources.tsv; on SIGTERM a summary (peaks, sums, block rate, spread, down samples) to
  resources-summary.txt and the log. It never fails a run.
- run.sh: NODES must be odd, 5 to 25 (warning above 15, max_neighbours=16); the main loop writes
  t/min/max to progress; stop_all stops the sampler first, so its last sample sees the nodes, and
  prints the summary last.
- testnet.yml: `nodes` input (5 to 15, checked before the build), job name with the node count,
  the summary in the step summary, resources files in the artifact.
- robustness.yml: `nodes` and `timeout_min` inputs; the NODE_STORAGE scenarios (laid out for 7
  nodes) run only at 7; longer job timeouts; contracts.log, node log files and resources in the
  artifact; the summary in the step summary.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts:
#	.github/workflows/robustness.yml
EnzinoBB added a commit that referenced this pull request Oct 22, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
EnzinoBB and others added 2 commits October 22, 2026 22:07
@EnzinoBB
EnzinoBB merged commit 7fc9670 into master Oct 23, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

testnet Run the private 7-node network workflow on this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant