feat: sn subnet integration — Phase 4 (wallet/claim/bind-head CLI), depends on Phase 1-3 (#272)#273
Merged
Merged
Conversation
…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
force-pushed
the
feat/sn-subnet-phase4-cli
branch
from
July 16, 2026 10:32
95917d0 to
38f4ad0
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
sn/miner/sn.goandsn/miner/sn_rpc.gointoprovider/verbatim (package miner→package main, no other changes).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 forwallet set/claim/bind-head/unbind-head, matchingOptions:entries, 4 new dispatch branches inmain(), and one idempotent--walletstartup hook insideprovide()that logs and continues on failure rather than blocking providing.providerStatePath,readProviderClientKeySeed,DefaultApiUrl,NewClientStrategyWithDefaults,NewEventWithContextwere all already present with matching signatures/behavior.--walletflag are explicitly used — no change to existingprovide/auth-provide/proxy *behavior.Validation & Testing
go build -p 2 ./...cleango vet -p 2 ./provider/...cleango test -p 2 ./provider/... -timeout 60scleanprovider wallet set <bad-ss58> --api_url=http://127.0.0.1:1dispatches correctly and fails on local ss58 validation before ever making a network callCommit Log