Skip to content

add neuron certificate discovery#2267

Merged
thewhaleking merged 11 commits intoopentensor:stagingfrom
backend-developers-ltd:encrypt
Nov 21, 2024
Merged

add neuron certificate discovery#2267
thewhaleking merged 11 commits intoopentensor:stagingfrom
backend-developers-ltd:encrypt

Conversation

@andreea-popescu-reef
Copy link
Contributor

Requirements for Adding, Changing, or Removing a Feature

subtensor migrated to version that handles certificate discovery

Description of the Change

Adds the ability to send neuron certificate and receive other neuron's certificates. This change will enable setting up mutual tls between neurons

serve_axon function takes an additional optional parameter certificate
if certificate is present the serve_axon_tls rpc call will be called on the subtensor and the neuron's certificate will be discoverable through the subtensor. The function will behave the same other than the possible storing of certificate.

get_neuron_certificate(netuid, neuron_uid) will fetch from the subtensor a specific neuron's certificate.

Alternate Designs

save the certificate as a field in the axon.
This can be implemented either:

  • on subtensor level, extend the axon to have a certificate field in both bittensor library and subtensor logic. Then, the certificate will just be passed along with the axon data in current serve_axon, get_neuron_info and other function. However this would break compatibility for multiple rpc calls encoding and would need patching.
  • on just bittensor library level, the bittensor library axon model would have a certificate field that would be stripped out on rpc calls to the subtensor, and similarly added as needed from separate rpc calls to the subtensor. However this obscures the axon's real data and adds complexity.

Possible Drawbacks

none?

Verification Process

TODO

Release Notes

  • tls certificates can now be passed via the serve_axon function and fetched via the get_neuron_certificate function

Copy link
Contributor

@thewhaleking thewhaleking left a comment

Choose a reason for hiding this comment

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

One suggestion, and a couple small nitpicks. Overall LGTM.

andreea-popescu-reef and others added 4 commits November 20, 2024 14:04
Co-authored-by: Benjamin Himes <37844818+thewhaleking@users.noreply.github.com>
Co-authored-by: Benjamin Himes <37844818+thewhaleking@users.noreply.github.com>
Co-authored-by: Benjamin Himes <37844818+thewhaleking@users.noreply.github.com>
Co-authored-by: Benjamin Himes <37844818+thewhaleking@users.noreply.github.com>
@andreea-popescu-reef andreea-popescu-reef force-pushed the encrypt branch 3 times, most recently from 3bed339 to 467bcf9 Compare November 20, 2024 10:18
thewhaleking
thewhaleking previously approved these changes Nov 20, 2024
@thewhaleking thewhaleking merged commit fef59c7 into opentensor:staging Nov 21, 2024
@ibraheem-abe ibraheem-abe mentioned this pull request Nov 26, 2024
"protocol": protocol,
"placeholder1": placeholder1,
"placeholder2": placeholder2,
"certificate": certificate,
Copy link
Contributor

Choose a reason for hiding this comment

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

Won't this make neuron_up_to_date always False? Just not sure if that's intended behavior.

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.

3 participants