-
Notifications
You must be signed in to change notification settings - Fork 208
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.