Add signature v2 format#983
Add signature v2 format#983Eugene-hu merged 7 commits intoopentensor:nobunagafrom adriansmares:feature/signature-v2
Conversation
|
why not just up the network version itself? edit: then use the version to decide on the parse method |
That wouldn't be backward compatible - new dendrites cannot talk to old axons (since old axons expect the old format). In this way there can be a transition period in which new dendrites can speak with old axons, and old axons allow traffic from old dendrites. In some future version, the |
I'm not suggesting you get rid of this. I'm suggesting you use the wire protocol version to do this instead of adding metadata |
So I've ended up doing this based on the advertised version on chain. The dendrite/receptor decides based on the endpoint version which signature to use. Note that this is a bit awkward right now - we cannot use version |
|
I think we can safely begin the review process on this PR. @eduardogr I would like your take as well. |
eduardogr
left a comment
There was a problem hiding this comment.
LGTM,
(commented already, i miss a couple of unit tests but everything good)
Thanks for this!
|
@adriansmares Merging this PR today, it will be released in the next version |
Summary
References #976
This PR introduces a new signature format for requests, in order to avoid situations in which validator requests are fulfilled by nodes which are not targeted by the RPC.
This PR is based on #976 in order to avoid merge conflicts - only the last two commits are relevant here.
Changes
v2signature format, which also takes into account the targetaxonhotkey. Thev2signature ensures that the signature cannot be faked by an intermediary that is not a validator.