Commit Graph

51 Commits

Author SHA1 Message Date
ce947e23f8 massive code cleanup 2025-04-23 21:16:38 -01:06
25ec17a0d0 removed things that were not even needed 2025-04-23 18:46:53 -01:06
fda2f638fb refactor logger so things can actually be moved around easily 2025-04-22 13:14:34 -01:06
ff4df430d9 migrating to realy.mleku.dev
can't extend realy.lol beyond september 2026, wtf
2025-04-10 12:32:52 -01:06
bf712d3216 refactor, clean up, and document subscription and tag 2025-04-08 09:56:10 -01:06
736c1276f4 fix the max limit of requests
was doing much more iterations finding serials than it should have been, this should improve performance a lot (and response processing time)
2025-04-06 05:44:55 -01:06
0fd717e293 document filter, add unix timestamp for json...
and add a package that allows type-specific nil detection on many common base types
2025-04-03 13:51:39 -01:06
d359e672a1 live configuration of IP blocklist 2025-04-02 15:12:52 -01:06
41f613da2d clean up some names and complete doc comments for event 2025-03-30 13:23:22 -01:06
758860762e full basic http protocol and admin tools
might be bugs in here but also some bugs have definitely been removed such as a problem with accepting events published by a different user such as happens with giftwraps
2025-03-25 07:26:35 -01:06
4fb70e2031 filter request working 2025-03-24 21:03:16 -01:06
06e343a7e7 export working 2025-03-22 10:29:54 -01:06
7389d58e7e add nuke method, integrate counter index, add full-id index
it is now simple to upgrade to the new version, export the db, then nuke, and import again and voila, all indexes now are generated
2025-03-12 17:44:17 -01:06
501cb33fad revising aliases ratel 2025-02-08 16:34:47 -01:06
757e65f984 expiration timestamp implemented, some small DoS mitigations
- expiration is implemented purely as deleting when fetched after expiration, not an active garbage collector

- mitigations include ignoring filters that are at most only since/until or less in the filter, capping the indexes that will be gathered to max 5000 for a query
2025-01-25 09:16:55 -01:06
69d9dc6978 fix replaceable event bug that didn't compare the d tag properly 2025-01-24 20:08:46 -01:06
58e408c243 public readable actually working 2025-01-24 19:22:25 -01:06
0fcd486192 public readable actually working 2025-01-24 19:12:31 -01:06
7b90dc8544 big set of fixes to pass github.com/mikedilger/relay-tester
doesn't seem to pass a last two tests:

Rejects submission of event before address is deleted: UNTESTED (blocked: not replacing newer parameterized replaceable event)
Accepts submission of event after address is deleted: FAIL (blocked: not replacing newer parameterized replaceable event)

but this may be because it tombstones deleted events and is rejecting resubmission of an older version that was thus deleted, so i'm calling it done
2025-01-23 10:23:02 -01:06
51d59d609e move prefixes where we meant them to be 2024-12-15 08:40:30 +00:00
e8dc7e6482 separate indexes and ratel's index key spec 2024-12-15 08:35:03 +00:00
4d8c83493f add compact database encoding and compression options 2024-12-09 09:58:41 +00:00
5699562396 converge all json marshal and unmarshal to less wordy
also changes the interface of unmarshal to not return an error, which is something that should really belong elsewhere, both a thing to forget and a thing to have divergences in, not the right way to do it
2024-12-07 15:57:36 +00:00
e49cf89689 refactor aliases to not be experted 2024-12-01 22:51:44 +00:00
311f5dc619 fix scheduling of access list to update immediately after saving updated lists 2024-11-29 18:16:44 +00:00
da03136b69 eliminate unnecessary work on export 2024-11-20 21:41:28 +00:00
ad4dce648f fuck binary encoding 2024-11-20 16:48:25 +00:00
a88176e9e6 GC fully checked and working 2024-11-17 13:33:34 +00:00
7617efd884 switched to protobuf 3 2024-11-16 09:10:04 +00:00
3ee52a57b4 export now pulls author and p tag matches with sub-path 2024-11-02 11:13:31 +00:00
e2a7d97968 now has working count, runs by default to report at startup 2024-10-29 11:58:00 +00:00
477739f699 now bumps access time counter 2024-10-29 11:35:49 +00:00
99018aaab6 actually implement replacing events in queries
made note todo for replacing events in counts
2024-10-29 11:14:01 +00:00
ce8f4add85 fix maxlimit to appear in nip-11 and be properly enforced
add flatten flag for store so it flattens on request at shutdown if an import has taken place

import runs GC every 10000 events to limit fragmentation of tables

implement a specific count function that only decodes the event if there is an extra filter (which should be the minority of cases)

change search to use maps for indexes to automatically deduplicate in case of multiple queries matching the same field

improve logging to show origins of request/events in relay accept req/event

count now returns an aproximate flag for the case of extrafilters finding replaceable events
2024-10-29 09:52:03 +00:00
27eb9bbfc4 fixed bug of binary codec not restoring tags 2024-10-28 15:43:54 +00:00
7ccf4b369b fix query performance so event idxs are found first then fetched second 2024-10-27 13:15:44 +00:00
8005ac8729 tidy up queryevents.go 2024-10-27 09:40:06 +00:00
64611433bc query forever loop found and removed 2024-10-27 06:33:02 +00:00
641aa05dae fixed query bug... opa 2024-10-25 19:58:18 +01:00
1958658ecb now doesn't crash on bulk upload but big speed problem 2024-10-25 08:26:35 +01:00
3e7f4b2262 add env print, fix some log prints for saving 2024-10-04 19:22:54 +01:00
3c95d4db3b fixed loads of things, auth, event ack, some tidier log messages 2024-09-29 13:04:22 +01:00
c71da71f0d actually implement auth properly 2024-09-26 18:28:12 +01:00
d39c9da4a0 fixes for delete by a-tag processing 2024-09-22 08:28:31 +01:00
7ece40087a fix delete by id test 2024-09-20 22:40:03 +01:00
f752b4e76e correctly rejects parameterized replaceable that is older than current 2024-09-20 21:09:17 +01:00
00a424e903 fixed issues with encapsulated tag api 2024-09-18 16:18:29 +01:00
77e93c9e19 returning limit amount of events as request 2024-09-17 19:47:17 +01:00
f3eed0b8b2 fixed zero limit effect 2024-09-17 17:13:09 +01:00
1983aaa549 changing to new domain 2024-09-16 19:21:34 +01:00