GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Merge mine-smoke-v2 and v2 upload-grant/relay-disable fixes · CortexLM/hypertrain@daf88a6

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • README.md
  • docs
    • network-v2.md
  • scripts
    • check-fast.sh
    • mine-smoke-v2.sh
    • mine_smoke_v2.py
  • src/hypertrain/challenge
    • store.py
  • tests
    • challenge
      • test_service_network_v2.py
    • test_mine_smoke_v2.py
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎README.md‎

Copy file name to clipboardExpand all lines: README.md
+1Lines changed: 1 addition & 0 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,7 @@ tests/ one directory per package
228228
## Contributing
229229

230230
- `uv sync --frozen --all-extras`, then `bash scripts/check.sh` before opening a pull request.
231+
- `bash scripts/mine-smoke-v2.sh` checks the network-v2 miner CLI chain end to end on CPU, offline (~2 min; see [docs/network-v2.md](docs/network-v2.md#cpu-smoke)).
231232
- Verification stays bitwise. Tolerance checks, obfuscation or trusted-hardware assumptions are out of scope for the security model.
232233
- When a route or message changes, update [docs/challenge-routes.md](docs/challenge-routes.md) and regenerate schemas with `uv run --frozen python -m hypertrain.protocol.schema docs/schemas`.
233234
- Publishing goes through `scripts/publish.sh`, which runs a strict secret scan and requires an out-of-band approval token.
Collapse file

‎docs/network-v2.md‎

Copy file name to clipboardExpand all lines: docs/network-v2.md
+20Lines changed: 20 additions & 0 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,21 @@ matching TOML fields; unknown TOML keys reject. Other existing fields:
8585
`allow_file_upload` (false). Do not assume these v1-oriented tuning fields alter
8686
the v2 server's deadlines or relay chunk policy.
8787

88+
## CPU smoke
89+
90+
`bash scripts/mine-smoke-v2.sh` runs this miner path offline on CPU: it starts the
91+
real challenge app (tiny test-ledger fixture run, throwaway fixture keys) on
92+
127.0.0.1 plus a self-signed TLS relay on localhost, then runs `join-v2`,
93+
`escrow-lock`, four `trial_export`/`probe-v2`/`proof-v2` trials and
94+
`run-v2 --round 0` as separate `uv run --frozen hypertrain-miner` processes. A round
95+
needs a four-identity eligible roster, so three peer identities are graduated
96+
in-process by the operator role (`"mode": "in-process"` in the evidence). PASS
97+
requires every stage at rc 0 and the round-0 delta recorded; measured ~132 s,
98+
budget `MINE_SMOKE_V2_BUDGET_SECONDS` (default 300). Evidence (stage, rc, ms) goes
99+
to `$MINE_SMOKE_V2_EVIDENCE` or a fresh 0600 temp file; `MINE_SMOKE_V2_BREAK=<stage>`
100+
points one of the four miner stages at a closed port to check failure detection. It proves the CLI
101+
chain, not CUDA, audits, settlement or production funding.
102+
88103
## Join, prove work, fund, graduate
89104

90105
Set `REQUEST_ID` to a fresh 64-hex request ID, `EXPIRY_BEACON` to a future
@@ -245,6 +260,11 @@ an exact complete receipt or full original chunk coverage, authenticated healthy
245260
witnesses and original grant/assignment lineage. The master fetches/hash-checks
246261
original bytes before acceptance. Rescue preserves custody without backdating
247262
late acceptance or charging the miner for proven storage failure.
263+
Multi-chunk custody without a receipt disables the relay key at once only when
264+
the master holds the original and it proves every chunk hash. Otherwise the key
265+
is disabled only after rescued bytes hash to `delta_hash`: the grant could not
266+
tie those chunk hashes to the commit, so a mismatch answers 422 and leaves the
267+
relay enabled.
248268
Retention release waits for finality, disputes and vesting; signed extensions,
249269
overlapping old/new keys and drain preserve existing retrieval authority.
250270

Collapse file

‎scripts/check-fast.sh‎

Copy file name to clipboardExpand all lines: scripts/check-fast.sh
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ mapfile -t paths < <(uv run --frozen python - <<'EOF'
1515
import sys
1616
sys.path.insert(0, "tests")
1717
import conftest # noqa: E402
18-
print("\n".join([*conftest.FAST_DIRS, *conftest.FAST_FILES]))
18+
print("\n".join([*conftest.FAST_DIRS, *conftest.FAST_FILES, "tests/test_mine_smoke_v2.py"]))
1919
EOF
2020
)
2121
start=$(date +%s%N)
Collapse file

‎scripts/mine-smoke-v2.sh‎

Copy file name to clipboard
+34Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
#!/usr/bin/env bash
2+
# CPU network-v2 mining smoke: challenge service + TLS relay on 127.0.0.1, one miner driving
3+
# join-v2 -> probe-v2 -> proof-v2 -> run-v2 through the real CLI (see scripts/mine_smoke_v2.py).
4+
# PASS = every stage exits 0 and run-v2 uploads round 0 inside the budget
5+
# (default 300 s: measured ~132 s on CPU, plus margin for a loaded host).
6+
set -euo pipefail
7+
cd "$(dirname "$0")/.."
8+
export PATH="$HOME/.local/bin:$PATH"
9+
10+
budget="${MINE_SMOKE_V2_BUDGET_SECONDS:-300}"
11+
evidence="${MINE_SMOKE_V2_EVIDENCE:-$(mktemp -d)/mine-smoke-v2-evidence.json}"
12+
export MINE_SMOKE_V2_EVIDENCE="$evidence"
13+
14+
start=$(date +%s%N)
15+
rc=0
16+
timeout -k 5 "$budget" uv run --frozen python scripts/mine_smoke_v2.py || rc=$?
17+
end=$(date +%s%N)
18+
elapsed_ms=$(( (end - start) / 1000000 ))
19+
20+
printf 'mine-smoke-v2: exit=%s elapsed=%sms budget=%ss evidence=%s\n' \
21+
"$rc" "$elapsed_ms" "$budget" "$evidence"
22+
23+
if [ "$rc" -eq 124 ]; then
24+
echo "mine-smoke-v2: FAIL (budget exceeded)" >&2
25+
exit 1
26+
fi
27+
[ "$rc" -eq 0 ] || exit "$rc"
28+
29+
budget_ms=$(( budget * 1000 ))
30+
if [ "$elapsed_ms" -gt "$budget_ms" ]; then
31+
echo "mine-smoke-v2: FAIL (${elapsed_ms}ms > ${budget_ms}ms)" >&2
32+
exit 1
33+
fi
34+
echo "mine-smoke-v2: PASS"

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.