Auto CK root validators on subnet registration. #2503
Open
shamil-gadelshin wants to merge 2 commits intodevnet-readyfrom
Open
Auto CK root validators on subnet registration. #2503shamil-gadelshin wants to merge 2 commits intodevnet-readyfrom
shamil-gadelshin wants to merge 2 commits intodevnet-readyfrom
Conversation
2113e28 to
8b25e71
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
do_set_root_validators_for_subnetfunction 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 rootvalidators and meet the
StakeThresholdrequired to callset_weightsdo_register_networkso relationships are scheduled automatically at subnet creation timedo_schedule_childrenflow (withPendingChildKeyscooldown)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 activatedtest_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 weightsvia inherited stake