bittensor icon indicating copy to clipboard operation
bittensor copied to clipboard

add neuron certificate discovery

Open andreea-popescu-reef opened this issue 1 year ago • 0 comments

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

andreea-popescu-reef avatar Aug 24 '24 01:08 andreea-popescu-reef