Greg Heartsfield
f543957b34
improvement: clear out hidden events during schema upgrade
2023-01-15 15:27:41 -06:00
Greg Heartsfield
fddbf321bc
perf: add indexes and force their use (authors)
2023-01-15 10:52:49 -06:00
Greg Heartsfield
ed336111bb
improvement: alert before long-running migration
2023-01-09 22:11:25 -06:00
Greg Heartsfield
66a55b55b9
perf: new index, manually selected when appropriate
2023-01-06 12:17:30 -06:00
Greg Heartsfield
50daab8a6f
refactor: make a standalone re-tagging function
2023-01-06 06:57:56 -06:00
Greg Heartsfield
9a84dc19e9
perf: author/kind index added (schema v13)
2023-01-04 16:51:02 -06:00
Greg Heartsfield
3dd0f2c9c6
fix: do not run auto_vacuum on read-only connections
2023-01-03 17:32:55 -06:00
Greg Heartsfield
b7c8737166
improvement: enable auto_vacuum on database creation
2023-01-03 06:22:43 -06:00
Greg Heartsfield
c0b112c094
improvement: enable auto_vacuum on connections
2023-01-03 06:22:04 -06:00
Greg Heartsfield
cb283ac316
fix: ensure that replaceable events are handled correctly regardless of order receieved
2023-01-02 17:18:11 -06:00
Greg Heartsfield
2c6ac69bfd
docs: remove incorrect comment
2023-01-02 15:41:17 -06:00
Greg Heartsfield
8c013107f9
perf: increase upper bound for sqlite mmap
2022-12-18 23:19:43 -06:00
Greg Heartsfield
129badd4e1
perf: reduce per thread mmap allocation for DB
2022-12-18 22:45:32 -06:00
Greg Heartsfield
7c1516c4fb
perf: add index for tags
2022-12-17 23:17:53 -06:00
Greg Heartsfield
0c72053a49
perf: increase mmap size to 1GB
2022-12-17 23:17:16 -06:00
Greg Heartsfield
cc06167e06
perf: add composite index for tag table
2022-12-17 12:01:20 -06:00
Greg Heartsfield
f9695bd0a9
fix: db schema version updates correctly for v9
2022-12-16 10:01:49 -06:00
Greg Heartsfield
7c4bf5cc8f
fix: run db migration for v9
2022-12-16 08:21:00 -06:00
Greg Heartsfield
4f606615eb
perf: indexing improvement
2022-12-16 08:16:49 -06:00
Greg Heartsfield
c48e45686d
perf: schema updates for better event indexing
2022-12-15 08:48:35 -06:00
Greg Heartsfield
9e9c494367
perf: significant query speedup when using kinds
.
...
fixes: https://todo.sr.ht/~gheartsfield/nostr-rs-relay/51
2022-12-14 21:04:49 -06:00
Greg Heartsfield
8ecce3f566
feat: show client IP in logs
2022-11-02 18:33:44 -05:00
Greg Heartsfield
72f8a1aa5c
feat(NIP-26): allow searches for delegated public keys
...
Implements core NIP-26 delegated event functionality. Events can
include a `delegation` tag that provides a signature and restrictions
on which events can be delegated.
Notable points on the implementation so far:
* Schema has been upgraded to include an index and new column.
* Basic rune parsing/evaluation to implement the example event in the
NIP, but no more.
* No special logic for deletion.
* No migration logic for determining delegated authors for
already-stored events.
2022-10-16 15:25:06 -05:00
Greg Heartsfield
3e8adf978f
refactor: move db migrations into isolated functions
2022-10-09 08:54:03 -05:00
Greg Heartsfield
2af5f9fbe8
fix: correct schema upgrade logic (and refactor)
...
Schema upgrades were buggy from 4->5 (the v5 would be skipped). This
change also refactors the logic slightly so that future additions can
be clearer (no need to have if and else-if combinations).
2022-10-09 08:24:01 -05:00
Greg Heartsfield
2739e49362
fix: correct future schema version detection
2022-10-08 13:15:48 -05:00
Greg Heartsfield
6633f8b472
feat: replace logging with tracing
2022-09-28 07:19:59 -05:00
Greg Heartsfield
08b011ad07
feat: ensure that WAL is truncated after checkpoint
2022-09-10 19:18:57 -05:00
Greg Heartsfield
a754477a02
improvement: misc refactorings (clippy)
2022-09-02 12:26:00 -05:00
Greg Heartsfield
035cf34673
fix(NIP-12): correctly search for mixed-case hex-like tags
...
Only lowercase and even-length tag values are stored as binary BLOBs.
Previously there was an error which search results from being returned
if the tag value was mixed-case and could be interpreted as hex.
A new database migration has been created to repair the `tag` table
for existing relays.
fixes: https://todo.sr.ht/~gheartsfield/nostr-rs-relay/37
2022-08-17 16:34:11 -07:00
Greg Heartsfield
e31d0729f2
chore: comment cleanup
2022-02-12 13:49:52 -06:00
Greg Heartsfield
89d96e7ccd
improvement: upgraded database schema to drop legacy tables
...
Database schema is upgraded to version 5. Legacy event and pubkey
tables are dropped, and indexes are added for NIP-05 verification.
2022-02-12 13:47:03 -06:00
Greg Heartsfield
7056aae227
refactor: create schema module
2022-02-12 09:58:42 -06:00