multiformats / multicodec

Compact self-describing codecs. Save space by using predefined multicodec tables.
MIT License
336 stars 201 forks source link

When should I use the private use area vs submitting a PR to add a codec? #300

Closed firelizzard18 closed 1 year ago

firelizzard18 commented 1 year ago

I am a lead developer on Accumulate, which is a distributed, partitioned network. A node may participate in more than one partition of the network. I am working on a peer-to-peer routing layer based on libp2p, and I plan to use multiaddrs to specify which node and/or partition a message should be sent to. For example /p2p/<id> specifies the node the message should be sent to, but not which partition; /acc-part/partition0 specifies the partition but not the node; /p2p/<id>/acc-part/partition0 specifies both. All three may be used, depending on the needs of the routing layer.

Anyone may send messages (though there may be a gateway for rate limiting/etc) but it's unlikely anyone outside of the Accumulate ecosystem would care. Should I submit a PR to define this as a codec? Or should I stick with the private use area?

rvagg commented 1 year ago

@firelizzard18 the definition of "private" is pretty fuzzy, I think we're trying to hint toward 192.168.* / 10.* type of "private", but also with the expectation that the private range is for dev and experimentation, the kind of thing that's not going to see the light of day and never be baked long-term into code or data. In your case, if you're deploying a public network, perhaps you should register entries for use; it may become useful for interop in the future. A heuristic might be -- if there's a conceivable case for the codes to be confused at some point in the future then reserve a unique code to avoid annoyance later.

firelizzard18 commented 1 year ago

@rvagg That answers my question, I expect we'll submit a PR when we're ready. The design is still in the prototype stage so we haven't nailed down how addresses will work.