libp2p / go-libp2p-pubsub

The PubSub implementation for go-libp2p
https://github.com/libp2p/specs/tree/master/pubsub
Other
321 stars 185 forks source link

Add warning about messageIDs #363

Closed rklaehn closed 4 years ago

rklaehn commented 4 years ago

See https://github.com/libp2p/specs/pull/285 and https://github.com/libp2p/go-libp2p-pubsub/issues/361

The problem is that many people implementing a protocol will not look at the specs, but grab the proto definition from the most mature impl, which is go-libp2p. But most languages, including rust, produce protobuf that rejects non-utf8 strings, leading to issues like https://github.com/libp2p/rust-libp2p/issues/1671 .

Ideally, in the long term this should be changed to bytes here as well. Bytes is just the better choice for an opaque id, where you might want to use compact random data and/or hashes.