Skip to content

feat: sn subnet integration — Phase 4 (wallet/claim/bind-head CLI), depends on Phase 1-3 (#272)#273

Merged
full-bars merged 1 commit into
mainfrom
feat/sn-subnet-phase4-cli
Jul 16, 2026
Merged

feat: sn subnet integration — Phase 4 (wallet/claim/bind-head CLI), depends on Phase 1-3 (#272)#273
full-bars merged 1 commit into
mainfrom
feat/sn-subnet-phase4-cli

Conversation

@full-bars

@full-bars full-bars commented Jul 13, 2026

Copy link
Copy Markdown
Owner

Summary

Fourth step of the incremental urfoundation/sn (Bittensor subnet) adoption plan: wires the actual subnet subcommands into the provider CLI. This is a separate, independently-unmerged PR stacked on #272 (Phase 1-3) — merging #272 does not bring this in. Kept separate deliberately since this is the first phase that changes real behavior (new CLI subcommands, a new startup hook), unlike #272 which is purely additive/inert.

What's Changed

  • Ported sn/miner/sn.go and sn/miner/sn_rpc.go into provider/ verbatim (package minerpackage main, no other changes).
  • Applied the same usage/options/dispatch patch upstream used when subnet support was first added to connect/provider/main.go (identified and diff-analyzed in feat: sn subnet integration — Phase 1-3 (deps + API client backport + main.go merge-risk analysis) #272's Phase 3) — new docopt usage lines for wallet set/claim/bind-head/unbind-head, matching Options: entries, 4 new dispatch branches in main(), and one idempotent --wallet startup hook inside provide() that logs and continues on failure rather than blocking providing.
  • Confirmed no collisions with existing fork code before porting (per feat: sn subnet integration — Phase 1-3 (deps + API client backport + main.go merge-risk analysis) #272's Phase 3 findings): providerStatePath, readProviderClientKeySeed, DefaultApiUrl, NewClientStrategyWithDefaults, NewEventWithContext were all already present with matching signatures/behavior.
  • Nothing invokes any of this unless the new subcommands or --wallet flag are explicitly used — no change to existing provide/auth-provide/proxy * behavior.

Validation & Testing

  • go build -p 2 ./... clean
  • go vet -p 2 ./provider/... clean
  • go test -p 2 ./provider/... -timeout 60s clean
  • Manual smoke test: provider wallet set <bad-ss58> --api_url=http://127.0.0.1:1 dispatches correctly and fails on local ss58 validation before ever making a network call

Commit Log

  • feat: wire subnet CLI commands (wallet set, claim, bind-head, unbind-head) by @full-bars in 95917d0

@full-bars full-bars changed the title feat: sn subnet integration — Phase 4 (wallet/claim/bind-head CLI) feat: sn subnet integration — Phase 4 (wallet/claim/bind-head CLI), depends on Phase 1-3 (#272) Jul 13, 2026
@full-bars full-bars self-assigned this Jul 13, 2026
Base automatically changed from feat/sn-subnet-phase1-2 to main July 13, 2026 21:28
…head)

Phase 4: ports sn/miner/sn.go + sn_rpc.go (package miner -> package main,
no other changes) and applies the same usage/options/dispatch patch
upstream used when it first added subnet support to provider/main.go
(before the move to urfoundation/sn) - new docopt usage lines, Options
entries, 4 dispatch branches, and one idempotent --wallet startup hook in
provide() that logs-and-continues on failure rather than blocking.

No collisions with existing fork code: providerStatePath, readProviderClientKeySeed,
DefaultApiUrl, NewClientStrategyWithDefaults, and NewEventWithContext were
all already present with matching signatures. Nothing invokes any of this
unless the new subcommands or --wallet flag are explicitly used.
@full-bars
full-bars force-pushed the feat/sn-subnet-phase4-cli branch from 95917d0 to 38f4ad0 Compare July 16, 2026 10:32
@full-bars
full-bars merged commit 5b1ec93 into main Jul 16, 2026
3 checks passed
@full-bars
full-bars deleted the feat/sn-subnet-phase4-cli branch July 16, 2026 10:39
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.

1 participant