-
Notifications
You must be signed in to change notification settings - Fork 85
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Extending multiaddr table per Application #6
Comments
The problem is agreement on the protocol table. multiaddr requires reserving a name + code. but yes, it should be extensible. not sure what the best way of doing this is that will not lead to just packing a bunch of protocols nobody else cares about into everyone's code. for now, for the |
(anyway, very open to suggestions, just mentioning constraints) |
One idea would be to define a meta-protocol Example:
Say uuid 213ae898-1892-44c2-a79e-ae512734ce38 is a repliable datagram in the I2P network SAM spec. So the string representation of a multiaddr of using a repliable I2P datagram would be
UUIDs are always 16 bytes long, so this is how they can be stored in the binary representation. Alternatively, the uuids could be longer and actually ipfs-adresses of the protocol specification document. |
Hang on, I just realized that this breaks the (/proto/value/)+ criterium. Maybe just remove the uuid part in the beginning:
if the text is an unknown protocol, assume its a UUID. |
👎 for UUID protocols. its not hard to make PR with a case for a reserved name. |
I thought this was the part that didn't scale well? |
Now with the multicodec table being universal for all multiformats, we can achieve this more easily by having reserved spaces for domain specific protocols. See implementation discussion here: multiformats/js-multiaddr#22 |
So, this becomes a problem when proxying/passing multiaddrs around. Concretely,
Currently, go doesn't know about the websocket-star protocol so it literally can't dial this address even though all the underlying transports should be able to do so. Unfortunately, we can't just pass over the unknown protocol codes as we have no way of knowing their argument lengths. In some cases, we can solve this by parsing the first part of the address and passing the rest to the next hop but I'm not convinced that completely solves the issue. |
Anything in the works to make it plugabble? In case I need to support some custom protocol for my app like:
"/ip4/104.236.151.122/david-protocol/best-protocol-eva!"
The text was updated successfully, but these errors were encountered: