Add Validate proxy support to runtime and Python SDK - #3041
Draft
cisterciansis wants to merge 3 commits into
Draft
Add Validate proxy support to runtime and Python SDK#3041cisterciansis wants to merge 3 commits into
cisterciansis wants to merge 3 commits into
Conversation
|
@cisterciansis is attempting to deploy a commit to the RaoFoundation Team on Vercel. A member of the Team first needs to authorize it. |
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
ProxyType::Validatewith stable on-chain ID 18set_weightscall sites by configuring the exact weight hotkeys on the clientAttribution
This work carries forward the original
ProxyType::Validateruntime design and test groundwork from #2543, authored by @ppolewicz. Thank you to Paweł Polewicz for proposing and implementing the original scoped validator proxy.This PR adapts that work to the current monorepo proxy-filter metadata model and adds the previously missing Python SDK integration.
Why
A validator operator may be authorized by several hotkeys to compute one weight vector and submit it for each validator. The runtime needs a narrow proxy role that cannot transfer value or manage stake. For commit-reveal subnets, the SDK must also preflight and timelock-encrypt against each real validator hotkey rather than the delegate key.
Unlike #2543, Validate proxies in this version cannot create additional proxies; each validator owner grants the delegate directly.
SDK behavior
Existing subnet weight-setting code does not change. The client owns the target configuration:
weight_targetsis authoritative when supplied:Validateproxyweight_targets=[]returns a successful no-op without signing, submitting, or paying a feeweight_targets(None) preserves the existing single-wallet behaviorThe SDK validates addresses and duplicates at client construction, verifies all proxied grants with block-pinned
Proxy.Proxiespoint reads, and fails closed before submission if configuration and chain state differ. It does not scan the global proxy map or accept unsolicited delegations.The configured calls are wrapped in one
Utility.batch_allextrinsic and signed once by the supplied hotkey, so they succeed or fail together. Plaintext and timelocked commit-reveal paths both preflight and build against the real validator identity.A single extrinsic has one signer, so the supplied wallet is intentionally the only possible direct signer in one execution. Other configured addresses are proxied targets.
Validation
cargo test -p subtensor-runtime-common --lib— 10 passedSKIP_WASM_BUILD=1 cargo test -p node-subtensor-runtime proxy_filters --lib— 14 passedLocal environment note
The native WASM build could not run locally because Apple clang lacks a wasm32 backend for the zstd C build.