Skip to content

Add logo_url to subnet identities#1750

Merged
sam0x17 merged 12 commits intoopentensor:devnet-readyfrom
bdmason:feature/add-logo-url-to-subnet-identity
Jun 13, 2025
Merged

Add logo_url to subnet identities#1750
sam0x17 merged 12 commits intoopentensor:devnet-readyfrom
bdmason:feature/add-logo-url-to-subnet-identity

Conversation

@bdmason
Copy link
Contributor

@bdmason bdmason commented Jun 12, 2025

Description

Fixes #1368, but I've ignored the bit about the twitter handle as the old chain identity I was comparing to is no longer in use on Bittensor.

Related Issue(s)

Type of Change

New v3 struct for SubnetIdentity, with migration plus new precompile method.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Other (please describe):

Breaking Change

If this PR introduces a breaking change, please provide a detailed description of the impact and the migration path for existing applications.

Checklist

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have run cargo fmt and cargo clippy to ensure my code is formatted and linted correctly
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

Screenshots (if applicable)

Please include any relevant screenshots or GIFs that demonstrate the changes made.

Additional Notes

Please provide any additional information or context that may be helpful for reviewers.

}

#[precompile::public(
"registerNetwork(bytes32,string,string,string,string,string,string,string,string)"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've left the method name the same, just added a new parameter. Only the internal function name has changed.

Copy link
Contributor

Choose a reason for hiding this comment

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

We also need the matching change in precompiles/src/solidity/subnet.sol and subnet.abi. Now they are missing the register_network_with_identity_v2 method.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've added these now

@bdmason bdmason marked this pull request as ready for review June 12, 2025 21:05
.zip(&subnet_list)
.find(|(_, subnet)| *subnet == &NetUid::from(*netuid))
{
*w = I64F64::saturating_from_num(*weight_ij);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This was raising a linting error, then I realised the method was redundant, so I deleted it. Nothing to do with the logo_url work, I can revert if needed.

}

#[precompile::public(
"registerNetwork(bytes32,string,string,string,string,string,string,string,string)"
Copy link
Contributor

Choose a reason for hiding this comment

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

We also need the matching change in precompiles/src/solidity/subnet.sol and subnet.abi. Now they are missing the register_network_with_identity_v2 method.

gztensor
gztensor previously approved these changes Jun 12, 2025
sam0x17
sam0x17 previously approved these changes Jun 12, 2025
@bdmason bdmason dismissed stale reviews from sam0x17 and gztensor via 09288aa June 12, 2025 22:26
@sam0x17
Copy link
Contributor

sam0x17 commented Jun 13, 2025

lovely, re-running CI

@sam0x17 sam0x17 added the skip-cargo-audit This PR fails cargo audit but needs to be merged anyway label Jun 13, 2025
sam0x17
sam0x17 previously approved these changes Jun 13, 2025
@sam0x17
Copy link
Contributor

sam0x17 commented Jun 13, 2025

ok looks good!

@sam0x17 sam0x17 merged commit 897b1e9 into opentensor:devnet-ready Jun 13, 2025
24 of 25 checks passed
This was referenced Jun 18, 2025
@sam0x17 sam0x17 mentioned this pull request Jun 27, 2025
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.

3 participants