When submitting events to relays, clients currently have no way to know
if an event was successfully committed to the database. This NIP
introduces the concept of command results which are like NOTICE's except
provide more information about if an event was accepted or rejected.
A command result is a JSON object with the following structure that is
returned when an event is successfully saved to the database or
rejected:
["OK", <event_id>, <true|false>, <message>]
nip20: https://github.com/nostr-protocol/nips/pull/62
Add a ping interval setting that allows you to customize the websocket
ping interval. The default of 5 minutes may be too high for some proxy
servers that disconnect connections that are held open for too long.
This enables support for using the proxied IP from cloudflare. The damus
relay is behind cloudflare, so to get accurate remote ip logging we need
to look at the headers instead of the socket address.
Signed-off-by: William Casarin <jb55@jb55.com>
These are pretty spammy on busy relays. I've been using the info log to
monitor spam attacks, and these are the least useful info log.
Leave the "stopping connection" log because it at least provides useful
sent/received information.
Signed-off-by: William Casarin <jb55@jb55.com>
The `reject_future_limits` option can now be disabled, and is by
default.
NIP-11 advertises support for created_at limits.
The message for future-dated events has been modified, to be closer to
the recommended example in the NIP.