Skip to content

Auto CK root validators on subnet registration. #2503

Open
shamil-gadelshin wants to merge 2 commits intodevnet-readyfrom
auto-ck-root-validators
Open

Auto CK root validators on subnet registration. #2503
shamil-gadelshin wants to merge 2 commits intodevnet-readyfrom
auto-ck-root-validators

Conversation

@shamil-gadelshin
Copy link
Collaborator

Summary

  • Add do_set_root_validators_for_subnet function that automatically establishes parent-child relationships between all root network validators and a subnet owner's hotkey, enabling the subnet owner to inherit stake from root
    validators and meet the StakeThreshold required to call set_weights
  • Integrate the function into do_register_network so relationships are scheduled automatically at subnet creation time
  • Each root validator becomes a parent of the subnet owner hotkey on the new subnet with full proportion (u64::MAX), using the existing do_schedule_children flow (with PendingChildKeys cooldown)

New tests

  • test_root_children_enable_subnet_owner_set_weights — verifies the function directly: subnet owner cannot set weights before, then can after root validator children are activated
  • test_register_network_schedules_root_validators — verifies end-to-end from register_network: pending children are automatically scheduled during subnet registration, activate after cooldown, and the subnet owner can then set weights
    via inherited stake

@shamil-gadelshin shamil-gadelshin added the skip-cargo-audit This PR fails cargo audit but needs to be merged anyway label Mar 17, 2026
@shamil-gadelshin shamil-gadelshin force-pushed the auto-ck-root-validators branch from 2113e28 to 8b25e71 Compare March 17, 2026 10:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip-cargo-audit This PR fails cargo audit but needs to be merged anyway

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant