rust-multiaddr icon indicating copy to clipboard operation
rust-multiaddr copied to clipboard

Tooling for unparsable `Multiaddr`

Open mxinden opened this issue 2 years ago • 0 comments

Sample use-case:

  • Roll out of new Protocol::X.
  • Old DHT nodes should forward Multiaddrs with Protocol::X of new nodes even though they can't parse the Multiaddr. Currently they don't.

Considerations:

  • Instead of providing e.g. an Unparsable type in multiaddr, each user that cares could also carry a Either<Multiaddr, Vec<u8>>.
  • One could add a Protocol::Unparsable(Vec<u8>) containing the remaining unparsable bytes. This might break existing implementations as they depend on Multiaddr either to succeed or fail, but not fail partially.

Related:

  • https://github.com/multiformats/multiaddr/issues/155

mxinden avatar Apr 19 '23 12:04 mxinden