Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/subnet sync #37

Merged
merged 25 commits into from
Sep 28, 2024
Merged

Feat/subnet sync #37

merged 25 commits into from
Sep 28, 2024

Conversation

drunest
Copy link
Contributor

@drunest drunest commented Sep 16, 2024

added subnet synchronization with side-by-side comparison

Comment on lines +13 to +16
migrations.RemoveField(
model_name="uploadedfile",
name="user",
),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this was merged with another PR


class Migration(migrations.Migration):
dependencies = [
("core", "0005_alter_validatorinstance_server_and_more"),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this probably needs adjustment

Comment on lines 59 to 66
def send_messages(subnet, subnet_identifier):
"""
This function sends messages to subnet operators.
Args: subnet: Subnet object
subnet_identifier: SubnetID
"""
# send message to subnet operators
pass
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this was implemented in another PR already

from auto_validator.core.utils.utils import get_subnet_by_hotkey, get_user_ip, send_messages


def verify_signature_and_route_subnet(view_func):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we might already have it but we may be missing some parameter here


V1_FILES_URL = "/api/v1/files/"


def test_file_upload(api_client, user, eq):
@pytest.mark.django_db
def test_file_upload_with_valid_signature(api_client, wallet, validator_instance):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tests are cool!

def wallet():
coldkey_name = "auto-validator7"
hotkey_name = "testhotkey7"
command1 = f"btcli wallet new_coldkey --wallet.name {coldkey_name}"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it'd be better to call proper functions from bittensor, but if it aint broken, don't fix it

@ppolewicz ppolewicz merged commit 2b14176 into bactensor:master Sep 28, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants