Skip to content

feat(scripts): submit public miner profile metadata signed with the coldkey#295

Merged
Thykof merged 4 commits into
mainfrom
feat/miner-profile-script
Jul 9, 2026
Merged

feat(scripts): submit public miner profile metadata signed with the coldkey#295
Thykof merged 4 commits into
mainfrom
feat/miner-profile-script

Conversation

@Thykof

@Thykof Thykof commented Jul 8, 2026

Copy link
Copy Markdown
Collaborator

What

Miners can now attach public identity metadata to their coldkey — display name, avatar image, and twitter/discord/linkedin handles — shown on their miner profile page on the dashboard. Ownership is proven with an sr25519 signature made with the coldkey: no account or API key.

  • scripts/submit_miner_profile.py — one-shot submission script for miner operators. Run it on whatever machine holds the coldkey (the key never leaves the machine; only the signature is sent). It builds a canonical JSON of the fields, signs synth-profile-metadata|v1|{coldkey}|{unix_ts}|{sha256(payload)} with wallet.coldkey, and PUTs it to the miner dashboard API. WALLET_PASS is supported to skip the decrypt prompt. Every submission replaces all five fields (omitted = cleared); --delete removes the metadata entirely.
  • docs/miner_tutorial.md — new section "5. Set up your public miner profile" with usage, field constraints, and the coldkey note.

Field constraints (enforced server-side): display name ≤ 40 printable chars; twitter/discord bare handles ≤ 64 chars of [A-Za-z0-9_.\-#]; avatar/linkedin https:// URLs ≤ 300 chars, linkedin pinned to linkedin.com.

Verification

  • black --check / flake8 clean.
  • Ran end-to-end with a throwaway wallet against the API: submit → 200 and the profile endpoint returns the metadata; --delete → 200 and it's gone; wrong wallet, unknown coldkey, stale timestamp, replayed timestamp, and invalid fields are all rejected with the documented status codes.

🤖 Generated with Claude Code

…oldkey

One-shot script for miner operators: sign a metadata payload (display
name, avatar, social handles) with the coldkey and submit it to the
miner dashboard API, which verifies the sr25519 signature as proof of
ownership. Adds a miner-tutorial section documenting usage and field
constraints.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a miner-operator workflow for publishing public profile metadata (display name, avatar, social handles) by signing a canonical payload with the coldkey and submitting it to the dashboard API, plus documentation to guide miners through setup.

Changes:

  • Introduces a one-shot Python script to sign and submit (or delete) miner profile metadata to the dashboard API.
  • Extends the miner tutorial with a new section describing usage and field constraints.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
scripts/submit_miner_profile.py New CLI script to sign coldkey-owned profile metadata and PUT it to the dashboard API.
docs/miner_tutorial.md Adds tutorial section explaining how to run the new submission script and constraints.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread scripts/submit_miner_profile.py Outdated
Comment thread scripts/submit_miner_profile.py Outdated
Comment thread scripts/submit_miner_profile.py
Thykof and others added 3 commits July 8, 2026 18:35
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Sixth metadata field: an arbitrary https:// URL (any host). Requires the
dashboard API deploy that accepts it; older deployments reject payloads
containing it with 401 (the signed hash includes the field).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@Thykof Thykof merged commit 010ecb3 into main Jul 9, 2026
5 checks passed
@Thykof Thykof deleted the feat/miner-profile-script branch July 9, 2026 11:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants