diff options
| author | Jeff Thibault <jdthibault2@gmail.com> | 2022-07-22 11:50:07 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-07-22 11:50:07 -0400 |
| commit | f51ce9dc0efaf61f39a76e112c310a9f58af1c87 (patch) | |
| tree | 67e90fb5451ed95d6394f371a6e50f058dcd1c9e /22.md | |
| parent | 140d48e4e95535ca9e3b99e2de93165096f3bc10 (diff) | |
add nip22: unacceptable event created_at field
Diffstat (limited to '22.md')
| -rw-r--r-- | 22.md | 23 |
1 files changed, 23 insertions, 0 deletions
| @@ -0,0 +1,23 @@ | |||
| 1 | NIP-22 | ||
| 2 | ====== | ||
| 3 | |||
| 4 | Unacceptable Event `created_at` time | ||
| 5 | --------------------------- | ||
| 6 | |||
| 7 | `draft` `optional` `author:jeffthibault` | ||
| 8 | |||
| 9 | Relays may support notifying clients that the event they published has an unacceptable `created_at` time. A relay will will consider the `created_at` time unacceptable if the `created_at` time is more than **[limit]** before the event was received by the relay. | ||
| 10 | |||
| 11 | If a relay supports this NIP, the relay SHOULD send the client a `NOTICE` message saying the event was not stored because the timestamp was too old. | ||
| 12 | |||
| 13 | Client Behavior | ||
| 14 | --------------- | ||
| 15 | |||
| 16 | Clients SHOULD use the `supported_nips` field to learn if a relay supports event `created_at` checks. | ||
| 17 | |||
| 18 | Motivation | ||
| 19 | ---------- | ||
| 20 | |||
| 21 | The motivation for this NIP is to prevent clients from saying they published an event *significantly* earlier than they actually did. | ||
| 22 | |||
| 23 | The event `created_at` field is just a unix timestamp (integer) so one could set it to a time in the past. For example, the `created_at` field could be set to a time 10 years ago even though it was created today and it could still be a valid event. This NIP aims to set a maximum amount of time elapsed between when an event was created and when it was *actually* published. | ||