Add SN7 and SN74 subnet alpha assets with hub pairs (PR2) - #708
Open
LandynDev wants to merge 15 commits into
Open
Add SN7 and SN74 subnet alpha assets with hub pairs (PR2)#708LandynDev wants to merge 15 commits into
LandynDev wants to merge 15 commits into
Conversation
…y the asset's decoder
…alpha leg at spot
… unreachable legs
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.
Add SN7 and SN74 subnet alpha as swappable assets, paired with the hubs only (
sol<->sn7,tao<->sn7,sol<->sn74,tao<->sn74). Stacked on #707.Registry
CHAIN_SN7/CHAIN_SN74: TAO's env prefix, clock and reorg depth;netuid+backing_family='tao'.constants.family()is the Python twin ofbacking.rs::family(prefix rule; a test pins registry rows to it).LAUNCH_ALPHASlaunches the hub pairs.hub_leg/declarable_backings/canonical_pairlearn the family rule: the literal hub anchors, else the family-bearing leg (an alpha is its own scoring family, spec §6).LAUNCH_PAIRSstays in canonical order (pinned). Alpha<->spoke pairs are deliberately absent — they mint new scoring families and are gated behind [BLOCKED: emissions redesign] Activate alpha-spoke pairs (PR3) #709.Asset
assets/alpha.py: first real use of the Asset/Chain seam —Alphabinds the existingTaoas its chain. Settlement = a top-levelSubtensorModule.transfer_stake(matched by name, no pallet indices) whose extrinsic emittedExtrinsicSuccessANDStakeTransferred, with the alpha amount read from the call args (the event carries the TAO-equivalent). Sends pick the hotkey holding the most alpha,mev_protection=False, per-asset dedup.can_deliver_to/delivery_refused/cancel_evidencereadTransferToggleandSubtokenEnabled(subnet-level, not user-weaponizable — spec §4.5).Cover check (spec §5)
swap_intake.leg_valueis the Python twin ofLegBind: exact legs first, a declared alpha leg is valued at spot viaAlpha.value_rao. Same function sizescollateral_amountat intake, gates the user's deposit, and gates the validator's initiate vote. Binary, no tolerance.CLI:
alw miner quotes --sn7-price/--sn74-pricederive fromLAUNCH_ALPHAS; the alpha address IS the TAO address — no new flags, no new env vars.Tests:
uv run pytest(full suite) +ruff. Testnet validates the full mechanism onsn7<->tao(spec §9).Emissions: hub pairs land inside the existing sol/tao families — 31 -> 35 pairs, alpha share 0%.