-
Notifications
You must be signed in to change notification settings - Fork 184
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(iroh): add ticket prefixes and a
doctor ticket-inspect
command (…
…#1711) ## Description Adds a `doc:` and `blob:` prefix to the doc and blob tickets respectively. This is mandatory and identifies the kind of iroh ticket. ## Notes & open questions doctor sample run (happy path): ``` doctor ticket-inspect blob:edjoqrkky753mdwphqrxbr2wjzkizv4hkb5s5ovav73c2zfuaja7aaibaqalkpj5jcqzsaqawu6t2sfbvubqbqfiaaf4ivyaycuaadgek4adtjetziwzcpcdqzemuxmwei2fp5wtmfjcy4qysovyzjhahfao3aaa ``` ``` Blob ticket: Ticket { node: PeerAddr { peer_id: PublicKey(2luekswh7o3a5tz4), info: AddrInfo { derp_region: Some( 1, ), direct_addresses: { 181.61.61.72:34144, 181.61.61.72:61486, 192.168.0.12:11204, 192.168.0.25:11204, }, }, }, format: Raw, hash: Hash( 39a493ca2d913c438648ca5d96223457f6d361522c721893ab8ca4e03940ed80, ), token: None, } ``` doctor sample run (unhappy path): ``` doctor ticket-inspect blob:EDJOQRKKY753MDWPHQRXBR2WJZKIZV4HKB5S5OVAV73C2ZFUAJA7AAIBAQALKPJ5JDQIUAQAWU6T2SFO4ABQBQFIAAGMIVYAYCU' Error: failed parsing blob ticket Caused by: 0: decoding failed: invalid length at 98 1: invalid length at 98 ``` another unhappy path: ``` doctor ticket-inspect asds:EDJOQRKKY753MDWPHQRXBR2WJZKIZV4HKB5S5OVAV73C2ZFUAJA7AAIBAQALKPJ5JDQIUAQAWU6T2SFO4ABQBQFIAAGMIVYAYCUAAGOEK4ADTJETZIWZCPCDQZEMUXMWEI2FP5WTMFJCY4QYSOVYZJHAHFAO3AAA' ``` ``` Error: unrecogized ticket prefix Caused by: Matching variant not found ``` ## Change checklist - [x] Self-review. - [x] Documentation updates if relevant. - [x] Tests if relevant.
- Loading branch information
1 parent
b9ee93e
commit 2d292e3
Showing
15 changed files
with
386 additions
and
276 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.