Commit Graph

70 Commits

Author SHA1 Message Date
fiatjaf 98dbe7b9e9 improve and make nip77 api nicer so it could be better used in nak. 2025-11-12 20:21:02 -03:00
fiatjaf 43fabbeb2a eventstore: more consistent ErrDupEvent firing. 2025-11-12 16:10:50 -03:00
fiatjaf 20f06d9608 eventstore: SortedMerge() helper for combining results from different eventstores. 2025-10-30 11:42:04 -03:00
fiatjaf 0aa0038c40 mmm: lockfile to prevent multiple instances. 2025-10-28 19:09:28 -03:00
fiatjaf b3c617e36b eventstore: cmd can read from files and doesn't break on long lines. 2025-10-28 18:40:51 -03:00
fiatjaf fc16a36481 mmm: stop truncating mmap, reorder commits and write operations such that eventual inconsistencies are minimized and less harmful. 2025-10-16 03:11:11 +00:00
fiatjaf 98cbe66e16 mmm: test that free ranges are being used. 2025-10-16 01:43:51 +00:00
fiatjaf 0dcaf0fa95 mmm: fixes to rescan logic. 2025-10-15 23:02:32 +00:00
fiatjaf 5d2675f356 mmm: freeranges tests and fixes. 2025-10-15 03:50:00 +00:00
fiatjaf ac49036b77 mmm: small .EnsureLayer() change, fuzz tests for fixing borked databases 2025-10-15 01:31:44 +00:00
fiatjaf 9e41bc69c4 mmm: test .Rescan() 2025-10-14 01:46:42 +00:00
fiatjaf 53e838c61d mmm: freeranges computed on startup and kept only in memory. 2025-10-14 00:38:51 +00:00
fiatjaf bcc7575e04 mmm: do random rescans in the fuzz test to ensure they don't break anything. 2025-10-14 00:25:44 +00:00
fiatjaf 95c70e3225 mmm: Rescan() 2025-10-14 00:19:52 +00:00
fiatjaf 47b1608e6b mmm: fix fuzz test. 2025-10-13 21:53:48 +00:00
fiatjaf 96fcff7908 mmm: drop mmap on .Close() call. 2025-10-13 21:26:42 +00:00
fiatjaf 4d1774264a mmm: add debug helpers for fixing an inconsistent db. 2025-10-12 13:55:44 +00:00
Jon Staab 113657314e Use ID in nip86.IDReason 2025-09-26 09:41:25 -03:00
fiatjaf 3c540e726e boltdb: fix reusing index key that has less capacity than necessary. 2025-09-23 19:34:59 -03:00
fiatjaf 79f1a9c636 fix sqlite mention. 2025-09-23 19:02:09 -03:00
fiatjaf fd9f956a3d update readmes so they're less outdated. 2025-09-22 17:05:17 -03:00
fiatjaf 9480fc1de6 eventstore: deletion safety tests. 2025-09-10 09:58:13 -03:00
fiatjaf 4754518278 mmm: querying by ids is restricted to the layer it was initiated. 2025-09-06 21:28:22 -03:00
fiatjaf cd398b94b5 get rid of badger everywhere, including as an sdk/hints backend. 2025-09-04 00:35:17 -03:00
fiatjaf 43d6814daf betterbinary: finally fix (well, a very hackish fix but should be ok) decoding events with way too many tags. 2025-08-27 01:19:08 -03:00
fiatjaf 72b5aa5051 lmdb: fix id logging when decoding fails. 2025-08-25 18:47:38 -03:00
fiatjaf d345bb3529 betterbinary: prevent binary index overflow by casting the numbers to int (from uint16). 2025-08-25 18:01:34 -03:00
fiatjaf b88edca786 eventstore: fix lmdb storing the same event a million times. 2025-08-22 18:02:19 -03:00
fiatjaf 6737398375 eventstore: cli "count" command. 2025-08-22 14:08:24 -03:00
fiatjaf 0f8a586593 lmdb: do the initial pull immediately, no need for a secondary loop. 2025-08-12 14:42:24 -03:00
fiatjaf 24b10ba2a5 eventstore: up limit to 10 on ReplaceEvent() 2025-08-06 00:28:21 -03:00
fiatjaf 92f6f75388 eventstore: fix yield() usage on ReplaceEvent() 2025-08-05 23:58:13 -03:00
fiatjaf 4c459d70ba eventstore: add basic ReplaceEvent() test. 2025-08-05 23:57:38 -03:00
fiatjaf 4a7e893b80 eventstore: add boltdb support to cli. 2025-08-05 23:40:23 -03:00
fiatjaf 414e836eaa eventstore: more fuzz test false alarms. 2025-08-05 23:02:04 -03:00
fiatjaf 030cad168d eventstore: fuzz testing found us a bug! 2025-08-05 22:56:55 -03:00
fiatjaf 47ca205e9e boltdb: it works! 2025-08-05 16:25:55 -03:00
fiatjaf 144f4a4740 eventstore: fix migrations annoyingly rerunning. 2025-08-05 13:09:50 -03:00
fiatjaf d79793c0f4 eventstore: boltdb (copied from lmdb) 2025-08-05 13:02:07 -03:00
fiatjaf 34225e5dfe mmm: run it on the eventstore/test suite and fix id query logic. 2025-08-05 07:36:20 -03:00
fiatjaf 17c3d19a98 eventstore: remove useless sanity checking since event fields are already typed. 2025-08-05 00:04:27 -03:00
fiatjaf 7e6a0eb614 mmm: copy new lmdb querying mechanism because it's so much more elegant. 2025-08-05 00:03:57 -03:00
fiatjaf e87e5a3fb8 lmdb: some random fuzz test samples. 2025-08-04 23:21:16 -03:00
fiatjaf 0291836eb7 lmdb: various fixes so query works. 2025-08-04 23:13:25 -03:00
fiatjaf a4ebd32477 lmdb: implement simple query by id part. 2025-08-04 17:39:59 -03:00
fiatjaf 1cd48343d6 fix quickselect. 2025-08-04 17:29:12 -03:00
fiatjaf 2750ae3751 lmdb: new querying mechanism. 2025-08-04 15:20:10 -03:00
fiatjaf 6bda63de17 eventstore: delete badger, it's too buggy. 2025-08-04 15:16:25 -03:00
fiatjaf 7289da9c72 improve/refactor websocket connections hoping this will fix the undetected disconnections we're seeing.
this commit also remove all the sonic envelope parsing and reintroduces filters in REQ as a slice instead of as a singleton.

why? well, the sonic stuff wasn't really that fast, it was a little bit but only got fast enough once I introduced unsafe conversions between []byte and string and did weird unsafe reuse of []byte in order to save the values of tags, which would definitely cause issues in the future if the caller wasn't aware of it (and even if they were, like myself).

and the filters stuff is because we abandoned the idea of changing NIP-01 to only accept one filter per REQ.
2025-07-10 22:58:37 -03:00
fiatjaf ca03dc60f7 eventstore/lmdb,mmm: fix key size for "a"-style tags. 2025-06-29 22:25:28 -03:00