libp2p / libp2p/go-libp2p-pubsub
Mechanism to send the message to the application level if a topic validation fails.
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 364
- Forks
- 221
- PR merge metrics
- No merged PRs in 30d
Description
Context: https://discuss.libp2p.io/t/topicvalidator-which-delivers-to-the-application-but-does-not-forward-to-the-network/1010
We would like a way to enable messages to still be sent to the application level, even if the message is invalidated (ValidationIgnore) by a topic validator.
Perhaps we could introduce a new type of Validation Response like ValidationIntercept, which signals that we don't want to forward or gossip the message, but we want to still have the message delivered to us at the application level.
One important thing to note here is that we may actually have to allow the application to modify the message data in order to do the validation. For example, the message payload may be serialized, but we may need to look at the deserialized data in order to do the validation. We wouldn't then want to pass the original message to the application, since then it would need to deserialize a second time.
Today, this can be accomplished by passing the message from the validation function into a side channel, but this is a hack and I would like to design a better way of supporting this use case.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the topic validator flow and the ValidationIgnore response described in the issue, then read the linked forum discussion for the proposed application-level delivery behavior. Define how validation can provide modified message data without forwarding or gossiping it; done requires an agreed API and tests covering invalidated messages delivered to the application.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- distributed-systems, networking
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100