bactensor / auto-validator

Bittensor Auto-validator initiative
1 stars 4 forks source link

[autovalidator] manual subnet synchronization button #22

Open ppolewicz opened 4 weeks ago

ppolewicz commented 4 weeks ago

We should add a button which will be exposed on the top right in the django admin interface of subnets, where if someone clicks it, the new definitions of subnets are pulled from https://github.com/taostat/subnets-infos/blob/main/subnets.json and a difference between what's already in the database is calculated against what has just been downloaded from taostats / other similar source, in form of "the following subnets have been added" / removed / changed and finally if the operator would approve the changes, the state from the view would be synchronized to the state in the database. The validator operators would go to this interface every time they want to service a new subnet, click that, then subsequently they'd create a server for the given subnet and install the validator on it (manually or automatically)

The button should be right next to ADD SUBNET on the subnet list view.

As for the view, how it might look like, if you go select any parent entity in django admin and select delete from the dropdown on the top and click GO, it'll display a summary page which displays what would happen to the rest of the objects if you would confirm a delete.

Basically we need to re-use the frontend elements from django for synchronization of subnets. We'll later have another button which will get subnet developers from a different json, and finally we'll do a fully automated mode where the button will sort of click itself so that the operator doesn't need to do anything (if they trust the supply chain, that is).

To be done by Fel

Image