Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update nostrdb, switch to local relay model #2121

Draft
wants to merge 116 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
116 commits
Select commit Hold shift + click to select a range
27dcd5f
nostrdb/build: fix additional compiler errors
jb55 Dec 11, 2023
b669e9f
nostrdb/add "import -"
mattn Dec 3, 2023
6029db6
nostrdb/stream: actually use file pointer in stream api
jb55 Dec 14, 2023
f16f71e
c: move cursor.h to nostrdb subdir
jb55 Jan 25, 2024
a5b0b57
nostrdb/api: don't expose many internals, like note
jb55 Dec 12, 2023
beb1ee6
nostrdb/cursor: fix warning that build.rs is complaining about
jb55 Dec 14, 2023
7fc8003
nostrdb/rust: initial api for Ndb and NdbConfig
jb55 Dec 14, 2023
95e1da2
nostrdb/build: fix constness on config pointer in ingester thread
jb55 Dec 14, 2023
05a23df
nostrdb/re-apply ispunct crash fix
jb55 Dec 17, 2023
8341418
c: move compiler to nostrdb dir
jb55 Jan 25, 2024
1e38726
nostrdb: add supporting files before the move commit
jb55 Jan 25, 2024
778c6ec
nostrdb: add supporting files for the bolt11 parser
jb55 Dec 23, 2023
a73eb08
c: move c files into nostrdb in prep for switchover
jb55 Jan 25, 2024
47946fb
nostrdb: port everything over to be in as sync as possible
jb55 Jan 25, 2024
7d4e498
nostrdb: move everything to src
jb55 Dec 23, 2023
aecbadd
nostrdb/add initial content parser
jb55 Dec 23, 2023
027b505
nostrdb/add libnostrdb.a
jb55 Dec 23, 2023
10b269c
nostrdb/cursor: re-apply infinite loop bug fix
jb55 Dec 23, 2023
e77553e
nostrdb/test: disable migrate for now
jb55 Dec 23, 2023
dd89947
nostrdb/varint: switch to 64 bit varints
jb55 Dec 23, 2023
0853163
nostrdb/fix build
jb55 Dec 23, 2023
2531744
nostrdb/fix github action
jb55 Dec 23, 2023
add2802
nostrdb/make: cleanup a bit, separate bench running
jb55 Dec 23, 2023
782bfba
nostrdb/block: add bolt11 invoice encoding/decoding
jb55 Dec 23, 2023
8fd8e91
nostrdb/bech32: retab
jb55 Dec 23, 2023
dde2832
nostrdb/nostr_bech32: only parse up to raw bech32 buffers
jb55 Dec 27, 2023
67bf632
nostrdb/cursor: add malloc_slice
jb55 Dec 27, 2023
777f8bb
nostrdb/cursor: add pull_varint_u32
jb55 Dec 27, 2023
c4ad3f9
nostrdb/cursor: fix empty string pushing in push_c_str
jb55 Dec 27, 2023
ea4dbb7
nostrdb/cursor: fix some warnings
jb55 Dec 27, 2023
71b5b1f
nostrdb/cursor: add align function
jb55 Dec 27, 2023
b2dc6b6
nostrdb/search: switch to cursor_align function
jb55 Dec 27, 2023
2bc4818
nostrdb/Inital embedded content parser
jb55 Dec 27, 2023
0886f99
nostrdb/nostr_bech32: parse in one pass
jb55 Dec 27, 2023
c3e06ee
nostrdb/bech32: add some initial tests
jb55 Dec 27, 2023
c2e3571
nostrdb/content_parser: add initial db decoders
jb55 Dec 27, 2023
320e89b
nostrdb/parser: handle period at end of url
kernelkind Dec 28, 2023
2a61fcf
nostrdb/blocks: add note block iterator
jb55 Dec 28, 2023
411d17b
nostrdb/bech32: fix big in bech32 size parsing
jb55 Dec 28, 2023
dd04f85
nostrdb/parser: fix bech32 block decoding
jb55 Dec 29, 2023
aa0ca83
nostrdb/invoice: fix crash in any-amount invoice parsing
jb55 Dec 29, 2023
ba89629
nostrdb/header: move bech32 around
jb55 Dec 30, 2023
7c426a9
nostrdb/blocks: add total_size
jb55 Dec 30, 2023
2c20662
nostrdb/blocks: add ndb_blocks_free
jb55 Dec 30, 2023
e410559
nostrdb/blocks: actually set the note block version
jb55 Dec 30, 2023
e78958e
nostrdb/blocks: write note blocks on ingest
jb55 Dec 29, 2023
f545be7
nostrdb/blocks: expose block iterator internals
jb55 Dec 31, 2023
2749cc8
nostrdb/fix clang compile issue
jb55 Dec 31, 2023
cec3f27
nostrdb/fix: don't write the owned flag to the DB
jb55 Jan 1, 2024
254097d
nostrdb/blocks: add ndb_blocks_flags function
jb55 Dec 31, 2023
4d66214
nostrdb/disable lmdb download
jb55 Jan 1, 2024
22b0d8f
nostrdb/Initial nostrdb relay subscriptions
jb55 Nov 27, 2023
ce939fe
nostrdb/test: switch reaction test to use subscriptions
jb55 Jan 3, 2024
b7897ef
nostrdb/search: don't enforce sequential tokens
jb55 Jan 4, 2024
0fa757f
nostrdb/subs: subs and monitor cleanup
jb55 Jan 3, 2024
d38c07d
nostrdb/filters: add ndb_filter_group_init function
jb55 Jan 3, 2024
1279c79
nostrdb/debug: add a few more debug statement
jb55 Jan 3, 2024
6f55b2f
nostrdb/subs: notify on profile notes as well
jb55 Jan 3, 2024
6be340e
nostrdb/subs: always fail when calling wait_for_notes on a subid of 0
jb55 Jan 3, 2024
07921c2
nostrdb/filter: sort filter elements
jb55 Jan 4, 2024
52236c6
nostrdb/filter: use binary search for large contact list filters
jb55 Jan 4, 2024
1d8a304
nostrdb/filters: remove ndb_filter_group from public API
jb55 Jan 4, 2024
a3b5cb0
nostrdb/ocd: small cleanup
jb55 Jan 4, 2024
9abacaa
nostrdb/filter: don't allow adding id elements on kinds
jb55 Jan 4, 2024
d0f52aa
nostrdb/cursor: remove old array code
jb55 Jan 4, 2024
d024dcb
nostrdb/query: extract ndb_cursor_start
jb55 Jan 4, 2024
92e0f35
nostrdb/cursor: fix bug when pushing last element
jb55 Jan 4, 2024
12b0228
nostrdb/Initial nostrdb queries
jb55 Jan 4, 2024
c556a14
nostrdb/query: implement kind queries
jb55 Jan 4, 2024
05eaa7a
nostrdb/Fix typos
shuoer86 Jan 5, 2024
f6fcf47
nostrdb/debug: add print_kind_keys helper
jb55 Jan 6, 2024
ea18168
nostrdb/cleanup: remove old dbscan stuff
jb55 Jan 6, 2024
960ebdb
nostrdb/filter: rename FILTER_GENERIC to FILTER_TAG
jb55 Jan 6, 2024
325932c
nostrdb/index: make sure kind index is DUPSORT + INTEGERDUP
jb55 Jan 6, 2024
24ceb18
nostrdb/Query Plans
jb55 Jan 6, 2024
56e95d3
nostrdb/ndb: add inital query command
jb55 Jan 6, 2024
817a962
nostrdb/query: support until for kind query plans
jb55 Jan 6, 2024
9275ebe
nostrdb/ndb: measure query performance
jb55 Jan 6, 2024
ce88bf5
nostrdb/fix macos build
jb55 Jan 6, 2024
a2c5588
nostrdb/perf: add some flamegraph helpers to makefile
jb55 Jan 8, 2024
81959b2
nostrdb/filter: don't end field if we don't have one active
jb55 Jan 8, 2024
dbe58e8
nostrdb/query: add tag index and tag queries
jb55 Jan 9, 2024
06cff81
nostrdb/tce: add AUTH to-client-event
fishcharlie Dec 24, 2023
77f199c
nostrdb: strblock: add typedef
jb55 Jan 25, 2024
ac38513
nostrdb: header: add ptr helpers for swift
jb55 Jan 25, 2024
c492490
nostrdb: blocks: add word count interface
jb55 Jan 26, 2024
5fbb654
nostrdb: tce: fix build for previous TCE change
jb55 Jan 26, 2024
624fc38
nostrdb: port kernelkind's to the new bech32 parser
jb55 Feb 1, 2024
5d332c3
nostrdb: queue: switch to prot_queue_try_pop_all
jb55 Feb 6, 2024
cba051b
nostrdb: ndb: add ndb_poll_for_notes
jb55 Feb 6, 2024
ec30d07
nostrdb: filters: copy filter metadata into subscription
jb55 Feb 7, 2024
78e86cc
nostrdb: silence annoying debug
jb55 Feb 7, 2024
6d12e70
nostrdb: return number of items popped when polling
jb55 Feb 7, 2024
f13974f
nostrdb: query: include note size in query results
jb55 Feb 8, 2024
3e53178
nostrdb: filter: add ndb_filter_end
jb55 Feb 8, 2024
f95dcb2
nostrdb: filter: use relative data offsets for easy cloning
jb55 Feb 9, 2024
6e35d8c
nostrdb: filter: add ndb_filter_clone
jb55 Feb 9, 2024
99b3a65
nostrdb: filter: make sure to return clone errors
jb55 Feb 9, 2024
3b1475b
nostrdb: filter: make sure clone copies metadata
jb55 Feb 9, 2024
2d61b86
nostrdb: random: add getrandom fallback for android
jb55 Feb 10, 2024
b7a432c
nostrdb: fix a few note size compile issues
jb55 Apr 4, 2024
96b46fa
nostrdb: cores: just set to 2 on unknown platforms
jb55 Feb 11, 2024
1d3b6ae
nostrdb: plan: add created_at query plan
jb55 Mar 12, 2024
d24f1d4
nostrdb: plan: use a less efficient plan for author query plans
jb55 Mar 13, 2024
6ad8cef
nostrdb: fix dubious looking parens logic
jb55 Apr 3, 2024
e1a105f
nostrdb: build: fix compile warning
jb55 Apr 4, 2024
dcdf3d0
nostrdb: add ability to register a subscription callback
jb55 Apr 4, 2024
ab89ffc
c: re-add damus-only C stuff
jb55 Jan 25, 2024
8cabe79
c: remove some unused files from project
jb55 Jan 25, 2024
41a864c
optimized id matching function
jb55 Feb 26, 2024
265f7ba
Switch over to use use blocks from nostrdb
jb55 Feb 2, 2024
d5c6f3d
Fix relay compile issue
jb55 Apr 4, 2024
656d6c3
ndb: add subscription callback initializers
jb55 Apr 4, 2024
f81182d
test: fix broken tests
jb55 Apr 5, 2024
d0b449c
REMOVEME: add assert to catch potential bug
jb55 Apr 17, 2024
c476272
wip local relay model
jb55 Apr 14, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion DamusNotificationService/NotificationFormatter.swift
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ struct NotificationFormatter {
content.title = Self.zap_notification_title(zap)
content.body = Self.zap_notification_body(profiles: state.profiles, zap: zap)
content.sound = UNNotificationSound.default
content.userInfo = LossyLocalNotification(type: .zap, mention: .note(notify.event.id)).to_user_info()
content.userInfo = LossyLocalNotification(type: .zap, mention: .init(nip19: .note(notify.event.id))).to_user_info()
return (content, "myZapNotification")
default:
// The sync method should have taken care of this.
Expand Down
2 changes: 1 addition & 1 deletion DamusNotificationService/NotificationService.swift
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class NotificationService: UNNotificationServiceExtension {
return
}

guard let notification_object = generate_local_notification_object(from: nostr_event, state: state) else {
guard let notification_object = generate_local_notification_object(ndb: state.ndb, from: nostr_event, state: state) else {
// We could not process this notification. Probably an unsupported nostr event kind. Suppress.
contentHandler(UNNotificationContent())
return
Expand Down
1 change: 1 addition & 0 deletions TODO
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1.5-24 profile loading was much better
1 change: 0 additions & 1 deletion damus-c/damus-Bridging-Header.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
// Use this file to import your target's public headers that you would like to expose to Swift.
//

#include "damus.h"
#include "bolt11.h"
#include "amount.h"
#include "nostr_bech32.h"
Expand Down
Loading