Jump to conversation
Unresolved conversations (8)
@vyzo vyzo Sep 25, 2020
I am not sure that this should be in the gossipsub spec -- it is a generic pubsub policy that applies to all routing algorithms.
pubsub/gossipsub/gossipsub-v1.1.md
@protolambda @raulk
@raulk raulk Sep 24, 2020
I'm not sure what the goal of this is. This might be better moved to after "Signature Policy Options", and put under a "Usage indications/notes" section. I would reword to something like this: * Origin-stamped messaging: choose `StrictSign`, and use in combination with the default `message_id_fn`. * Content-addressed messaging: enable `StrictNoSign`, with a custom hash-based `message_id_fn`. Any signatures would now be part of the payload, and would need to be validated through a custom message validator.
pubsub/gossipsub/gossipsub-v1.1.md
@protolambda
@raulk raulk Sep 24, 2020
```suggestion Some applications may not need keepalives, or choose to implement something more specific than a message hash. In those cases where duplicate payloads are not desirable, a `content-based` message ID function may be more appropriate. ```
Outdated
pubsub/README.md
@protolambda
@raulk raulk Sep 22, 2020
Separate these in two sub-bullets. "On the message producer side:" / "On the message receiver side:"
Outdated
pubsub/gossipsub/gossipsub-v1.1.md
@raulk raulk Sep 22, 2020
"origin-stamping" option.
Outdated
pubsub/gossipsub/gossipsub-v1.1.md
@protolambda @raulk
@raulk raulk Sep 22, 2020
I think the content-addressed and author-addressed word choice might be a bit confusing. How about "anonymous" and "origin-stamped"?
Outdated
pubsub/gossipsub/gossipsub-v1.1.md
@protolambda
@raulk raulk Sep 22, 2020
Mind elaborating what does `content-based messages` means here?
Outdated
pubsub/README.md
@protolambda @raulk
@arnetheduck arnetheduck Sep 22, 2020
this is problematic because protobuf is non-deterministic in its marshalling - the way to write this specification would be to remove mentions of protobuf and instead explicitly outline the marshalling in terms of key-value pairs and field types - it would have to be done carefully such that the result is readable by a compliant protobuf parser - it might also happen by chance that some protobuf encoders produce a valid byte stream, but with unrecognised fields in particular, the likelihood is low.
pubsub/README.md
@vyzo @raulk
Resolved conversations (16)
@raulk raulk Sep 25, 2020
```suggestion timecache interval, as they will get treated as duplicates. ```
Outdated
pubsub/README.md
@vyzo vyzo Sep 25, 2020
ignored, not rejected.
Outdated
pubsub/README.md
@raulk raulk Sep 24, 2020
```suggestion > [[ Implementation note ]]: At the time of writing this section, go-libp2p-pubsub (reference implementation of this spec) allows for configuring the signature policy at a global pubsub instance level. This needs to be pushed down to topic-level configuration. Other implementations are encouraged to support topic-level configuration, as the spec mandates. ```
Outdated
pubsub/gossipsub/gossipsub-v1.1.md
@raulk raulk Sep 24, 2020
```suggestion The usage of the `signature`, `key`, `from`, and `seqno` fields in `Message` is now configurable per topic, in the manners specified in this section. ```
Outdated
pubsub/gossipsub/gossipsub-v1.1.md
@raulk raulk Sep 24, 2020
```suggestion - `LaxNoSign`: *Previous default for no-verification*. Do not sign nor origin-stamp, but verify incoming signatures, and accept unsigned messages. ```
Outdated
pubsub/gossipsub/gossipsub-v1.1.md
@raulk raulk Sep 24, 2020
```suggestion - `LaxSign`: *this was never an original gossipsub 1.0 option, but it's defined here for completeness, and considered insecure*. Always sign, and verify incoming signatures, and but accept unsigned messages. ```
Outdated
pubsub/gossipsub/gossipsub-v1.1.md
@raulk raulk Sep 24, 2020
```suggestion In gossipsub v1.0, a legacy "lax" signing policy could be configured, to only verify signatures when present. For security reasons, this is strategy is discarded in subsequent versions, but MAY still be supported for backwards-compatibility. If so, its use should be discouraged through prominent deprecation warnings. These strategies will be entirely dropped in the future. ```
Outdated
pubsub/gossipsub/gossipsub-v1.1.md
@raulk raulk Sep 24, 2020
```suggestion - A `message_id` function will not be able to use the above fields, and should instead rely on the `data` field. A commonplace strategy is to calculate a hash. ```
Outdated
pubsub/gossipsub/gossipsub-v1.1.md
@raulk raulk Sep 24, 2020
```suggestion - Build messages with the `signature`, `key` (`from` may be enough for certain inlineable public key types), `from` and `seqno` fields. ```
Outdated
pubsub/gossipsub/gossipsub-v1.1.md
@raulk raulk Sep 24, 2020
```suggestion Note that different specialized pubsub components, such as the 'timecache' used in the Go implementation, scoring functions or circuit-breakers may use the `message_id` to key and track messages. ```
Outdated
pubsub/README.md
@raulk raulk Sep 24, 2020
```suggestion If fabricated collisions are not a concern, or difficult enough within the window the message is relevant in, a `message_id` based on a short digest of inputs may benefit performance. Whichever the choice, it is crucial that **all peers** participating in a topic implement the same message ID calculation logic, or the topic may function suboptimally. ```
Outdated
pubsub/README.md
@raulk raulk Sep 24, 2020
```suggestion **The default `message_id_fn` is origin-stamped,** and defined as the string concatenation of `from` and `seqno`. ```
Outdated
pubsub/README.md
@raulk raulk Sep 24, 2020
```suggestion - **content-addressed** messaging: a message ID derived from the `data` field ```
Outdated
pubsub/README.md
@raulk raulk Sep 24, 2020
```suggestion The message ID calculation approach generally fits in two flavors: ```
Outdated
pubsub/README.md
@raulk raulk Sep 24, 2020
```suggestion To uniquely identify a message in a set of topics (for de-duplication, tracking, scoring and other purposes), a `message_id` is calculated based on the message. How the calculated happens can be configured on the application layer by supplying a function `message_id_fn`, such that `message_id_fn(*Message) => message_id`. > [[ Implementation note ]]: At the time of writing this section, go-libp2p-pubsub (reference implementation of this spec) only allows configuring a single top-level `message_id_fn`. This function may, however, vary its behaviour based on the topic (contained inside its `*Message`) argument. Thus, it's feasible to implement a per-topic policy using branch selection control flow logic. go-libp2p-pubsub plans to push down the configuration of the `message_id_fn` to the topic level. Other implementations are encouraged to do the same. ```
Outdated
pubsub/README.md
@arnetheduck arnetheduck Sep 24, 2020
```suggestion Initially this could be configured globally, however, because the policies are mutually incompatible, configuration on a per-topic basis will facilitate mixed protocols better. ```
Outdated
pubsub/gossipsub/gossipsub-v1.1.md