diff options
| author | Jeff Thibault <jdthibault2@gmail.com> | 2022-07-22 12:45:14 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-07-22 12:45:14 -0400 |
| commit | 8bef0e9d79ebb4b11f8fd2bea11dc8f1668bc9d0 (patch) | |
| tree | cb5ee1a96e058935c5993977b38cbe5d2200901d | |
| parent | f51ce9dc0efaf61f39a76e112c310a9f58af1c87 (diff) | |
add that events from future are unacceptable
| -rw-r--r-- | 22.md | 10 |
1 files changed, 5 insertions, 5 deletions
| @@ -6,18 +6,18 @@ Unacceptable Event `created_at` time | |||
| 6 | 6 | ||
| 7 | `draft` `optional` `author:jeffthibault` | 7 | `draft` `optional` `author:jeffthibault` |
| 8 | 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. | 9 | Relays may support notifying clients that the event they published has an unacceptable `created_at` time. A relay will consider the `created_at` time unacceptable if the `created_at` time is more than **[limit]** before the event was received by the relay (in the past) OR if the `created_at` time is later than the time the event was received by the relay (in the future). |
| 10 | 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. | 11 | If a relay supports this NIP, the relay SHOULD send the client a `NOTICE` message saying the event was not stored because the `created_at` time was unacceptable. |
| 12 | 12 | ||
| 13 | Client Behavior | 13 | Client Behavior |
| 14 | --------------- | 14 | --------------- |
| 15 | 15 | ||
| 16 | Clients SHOULD use the `supported_nips` field to learn if a relay supports event `created_at` checks. | 16 | Clients SHOULD use the `supported_nips` field to learn if a relay supports event `created_at` time checks. |
| 17 | 17 | ||
| 18 | Motivation | 18 | Motivation |
| 19 | ---------- | 19 | ---------- |
| 20 | 20 | ||
| 21 | The motivation for this NIP is to prevent clients from saying they published an event *significantly* earlier than they actually did. | 21 | The motivation for this NIP is to prevent clients from saying they published an event *significantly* earlier than they actually did or saying they published an event in the future. |
| 22 | 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. | 23 | The event `created_at` field is just a unix timestamp (integer) so one could set it to a time in the past or future. 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. One could also set the `created_at` field to a time 10 years in the future 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 and prevent events from being from the future. |