Commit Graph

61 Commits

Author SHA1 Message Date
Alex Gleason
4eb7ea2461 Remove e: any from error handlers 2024-11-22 10:26:30 -06:00
P. Reis
df27959d35 fix(relay.ts): purify event 2024-10-08 14:15:48 -03:00
P. Reis
60ebff45d5 refactor: use correct Stickynotes, and not legacy Debug 2024-09-23 15:33:14 -03:00
P. Reis
1a1adc1654 feat: add ditto:relay in /relay - sticky notes 2024-09-23 14:47:17 -03:00
Alex Gleason
ebce4a8b1d Fix a few more type errors, whoops 2024-09-22 17:46:21 -05:00
Alex Gleason
5a0a2087e5 relay: fix connection metrics 2024-09-21 14:48:50 -05:00
Alex Gleason
5454942a2c Update Prometheus metrics to conform to best practices 2024-09-07 08:52:02 -05:00
Alex Gleason
1a69df1cd7 Add timeout message to the relay 2024-08-12 23:04:12 -05:00
Alex Gleason
950adb25c6 Fix relay connections metrics 2024-08-03 08:19:21 -05:00
Alex Gleason
96fe8920cd Make database timeouts configurable 2024-07-12 13:49:44 -05:00
Alex Gleason
5c6479b3fe Rate-limit messages to the relay 2024-07-11 17:10:05 -05:00
Alex Gleason
ae687bb525 Increase timeouts 2024-07-01 23:05:03 +01:00
Alex Gleason
092a20088a Reduce timeouts 2024-07-01 09:18:42 +01:00
Alex Gleason
9ea6c7b00b Add query timeouts 2024-06-29 22:26:51 +01:00
Alex Gleason
e6cd3d9e47 prometheus: add gauges for websocket connections 2024-06-24 09:23:26 -05:00
Alex Gleason
e0b1029953 prometheus: track relay messages by verb 2024-06-24 08:18:11 -05:00
Alex Gleason
c44347e9d1 Fix relay metrics 2024-06-22 10:28:42 -05:00
Alex Gleason
31a5533fd7 Add Prometheus metrics 2024-06-21 22:38:25 -05:00
Alex Gleason
761143a317 relay: give a nice "fuck you" to clients sending invalid filters 2024-05-31 13:58:06 -05:00
Alex Gleason
5f73232418 relay: remove enforceFilters function 2024-05-28 14:51:07 -05:00
Alex Gleason
16558e24c9 Set idleTimeout to 30s for WebSocket connections 2024-05-25 13:39:19 -05:00
Alex Gleason
68b5887ed0 Don't let your memes be dreams 2024-05-14 18:24:34 -05:00
Alex Gleason
ecfea827e1 Move RelayError into its own file, add helper methods 2024-05-14 14:38:38 -05:00
Alex Gleason
fc7ed8bf24 Remove zod schemas that we can get from NSchema 2024-05-01 19:51:12 -05:00
Alex Gleason
c190d2c8ce Refactor Storages to get lazy-loaded only when they are used 2024-05-01 14:56:47 -05:00
Alex Gleason
4e4b7711c9 relay: NSchema 2024-04-25 18:48:02 -05:00
Alex Gleason
7ee258fe87 relay: fix local filtering logic 2024-04-25 18:46:34 -05:00
Alex Gleason
7aa931a69e try-catch the InternalRelay req's 2024-04-25 18:24:03 -05:00
Alex Gleason
7a18a19b2f Remove subs.ts & subscription.ts, refactor around it 2024-04-25 18:23:26 -05:00
Alex Gleason
0aab3eb775 Rewrite hydrateEvents 2024-04-23 19:31:48 -05:00
Alex Gleason
9c91e41e87 Switch NSpec to Nostrify, update imports 2024-04-19 16:39:35 -05:00
Alex Gleason
29a63f262f Log relay error, remove unnecessary DVM conditional 2024-03-26 21:10:59 -05:00
Alex Gleason
cb80770fc7 Upgrade NSpec, update count interface 2024-02-12 10:48:26 -06:00
Alex Gleason
5b24b7ad39 Pass Request signal down from API controllers 2024-01-23 15:58:59 -06:00
Alex Gleason
c6062874bd Implement NStore interface from NLib 2024-01-23 14:06:51 -06:00
Alex Gleason
aaf01462c1 Update code to use new DittoEvent and DittoFilter. Event -> NostrEvent 2024-01-23 12:07:22 -06:00
Alex Gleason
937ae1eab6 Refactor EventStore to use a more Set-like interface 2024-01-08 15:18:01 -06:00
Alex Gleason
b3e4b79439 Delete db/events.ts, db/memorelay.ts, move to @/storages.ts 2024-01-03 21:56:41 -06:00
Alex Gleason
3472428da8 relay: fix wrong function name 2023-12-29 21:12:57 -06:00
Alex Gleason
e6c8d1dad9 Add an EventStore interface, refactor eventsDB 2023-12-29 13:12:16 -06:00
Alex Gleason
26e64e781c Add NIP-11 support 2023-12-19 21:15:41 -06:00
Alex Gleason
c1bf326981 c.req.headers.get --> c.req.header, hono deprecation 2023-11-20 12:39:20 -06:00
Alex Gleason
0f9ff5bcaa relay: fix querying by ids and authors 2023-09-11 19:45:27 -05:00
Alex Gleason
d01dbcbfee relay: add support for NIP-45 COUNT 2023-08-29 15:24:07 -05:00
Alex Gleason
b60e84d29b relay: only send if socket is open 2023-08-25 15:09:16 -05:00
Alex Gleason
d1117f5513 relay: improve variable names in handleReq 2023-08-25 13:42:58 -05:00
Alex Gleason
baace5ea2d Refactor streaming to use async iterators 2023-08-25 13:35:20 -05:00
Alex Gleason
00c531bbff relay: close sub when socket is closed 2023-08-24 18:43:14 -05:00
Alex Gleason
a676b71d23 relay: make Nostr streaming work 2023-08-23 23:25:38 -05:00
Alex Gleason
0f70f5c76f Add a RelayError class, improve relay error handling 2023-08-17 20:24:16 -05:00