Quiet log noise from foreign non-Angor kind-3030 Nostr events#907
Merged
Conversation
RelayService.LookupLatestProjects listens for all kind-3030 events across every configured relay, including public general-purpose relays. Kind 3030 is a draft/custom Nostr kind (not officially reserved), so other apps can and do reuse the same kind number for unrelated, non-JSON content, which previously logged a Warning with a full JsonException stack trace for every such event. Add a cheap LooksLikeJsonObject check before attempting deserialization: content that isn't shaped like a JSON object is skipped quietly at Debug level, while content that looks like JSON but still fails to map to T still logs at Warning, since that would indicate a real Angor-side issue.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
RelayService.LookupLatestProjects (used by
Find Projects-> latest-from-Nostr flow) subscribes to all events of kind 3030 across every configured relay, including public general-purpose relays (elay.damus.io,
os.lol). This produced warnings like:
Root cause
Kind 3030 is Angor's own draft/custom Nostr kind and is not officially reserved in the canonical Nostr NIPs registry, so other unrelated applications can reuse the same kind number. I fetched the exact event directly from
elay.damus.io and confirmed: