libp2p / libp2p/go-libp2p-pubsub
Skip local validation by default when publishing
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 364
- Forks
- 221
- PR merge metrics
- No merged PRs in 30d
Description
Publishing invalid messages is an app-level logic error. Local validation is helpful during development to catch these issues, but it reduces throughput if performed for every message in production. After all, data generated by the application is trusted data; under normal conditions you wouldn't sign a message and immediately after validate your own signature.
I propose gating local validation behind an option flag WithLocalValidation, which devs can enable during development to catch such errors.
Alternatively, if we're concerned about behavioural breakage we can keep the current default and introduce the opposite flag SkipLocalValidation to opt out in production. However, it'd be nice if at some point we bundled a set of breaking cleanups and shipped them at once to declutter production-ready configuration as much as possible.
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 by locating the publishing path and the existing local-validation option or check. Compare the proposed WithLocalValidation default with the alternative SkipLocalValidation behavior, then identify the relevant tests for publishing invalid messages and validation errors. Done means the selected default and opt-out behavior are covered without changing unrelated publishing behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- distributed-systems
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100