-
Notifications
You must be signed in to change notification settings - Fork 288
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
base: master
Are you sure you want to change the base?
Commits on Apr 25, 2024
-
nostrdb/build: fix additional compiler errors
When trying to build from rust Signed-off-by: William Casarin <jb55@jb55.com>
Configuration menu - View commit details
-
Copy full SHA for 27dcd5f - Browse repository at this point
Copy the full SHA 27dcd5fView commit details -
Closes: damus-io/nostrdb#21 Signed-off-by: William Casarin <jb55@jb55.com>
Configuration menu - View commit details
-
Copy full SHA for b669e9f - Browse repository at this point
Copy the full SHA b669e9fView commit details -
nostrdb/stream: actually use file pointer in stream api
Right now it's accidently hardcoded. Fixes: 8376e5bca05c ("add "import -"") Signed-off-by: William Casarin <jb55@jb55.com>
Configuration menu - View commit details
-
Copy full SHA for 6029db6 - Browse repository at this point
Copy the full SHA 6029db6View commit details -
Configuration menu - View commit details
-
Copy full SHA for f16f71e - Browse repository at this point
Copy the full SHA f16f71eView commit details -
nostrdb/api: don't expose many internals, like note
rust doesn't like packed structures, so hide this from bindgen This also buttons up the API so less things are exposed which is good. Signed-off-by: William Casarin <jb55@jb55.com>
Configuration menu - View commit details
-
Copy full SHA for a5b0b57 - Browse repository at this point
Copy the full SHA a5b0b57View commit details -
nostrdb/cursor: fix warning that build.rs is complaining about
Signed-off-by: William Casarin <jb55@jb55.com>
Configuration menu - View commit details
-
Copy full SHA for beb1ee6 - Browse repository at this point
Copy the full SHA beb1ee6View commit details -
nostrdb/rust: initial api for Ndb and NdbConfig
This is the start of our rust library for nostrdb. Implement idiomatic interfaces for Ndb and NdbConfig. Changelog-Added: Add initial rust library Signed-off-by: William Casarin <jb55@jb55.com>
Configuration menu - View commit details
-
Copy full SHA for 7fc8003 - Browse repository at this point
Copy the full SHA 7fc8003View commit details -
nostrdb/build: fix constness on config pointer in ingester thread
otherwise build fails Signed-off-by: William Casarin <jb55@jb55.com>
Configuration menu - View commit details
-
Copy full SHA for 95e1da2 - Browse repository at this point
Copy the full SHA 95e1da2View commit details -
nostrdb/re-apply ispunct crash fix
since it was overwritten when we synced with damus Signed-off-by: William Casarin <jb55@jb55.com>
Configuration menu - View commit details
-
Copy full SHA for 05a23df - Browse repository at this point
Copy the full SHA 05a23dfView commit details -
c: move compiler to nostrdb dir
we will be applying a patch here as well
Configuration menu - View commit details
-
Copy full SHA for 8341418 - Browse repository at this point
Copy the full SHA 8341418View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1e38726 - Browse repository at this point
Copy the full SHA 1e38726View commit details -
nostrdb: add supporting files for the bolt11 parser
A lot of this was pulled from core-lightning. Not sure what is actually needed or not. Signed-off-by: William Casarin <jb55@jb55.com>
Configuration menu - View commit details
-
Copy full SHA for 778c6ec - Browse repository at this point
Copy the full SHA 778c6ecView commit details -
Configuration menu - View commit details
-
Copy full SHA for a73eb08 - Browse repository at this point
Copy the full SHA a73eb08View commit details -
Configuration menu - View commit details
-
Copy full SHA for 47946fb - Browse repository at this point
Copy the full SHA 47946fbView commit details -
nostrdb: move everything to src
Signed-off-by: William Casarin <jb55@jb55.com>
Configuration menu - View commit details
-
Copy full SHA for 7d4e498 - Browse repository at this point
Copy the full SHA 7d4e498View commit details -
nostrdb/add initial content parser
Signed-off-by: William Casarin <jb55@jb55.com>
Configuration menu - View commit details
-
Copy full SHA for aecbadd - Browse repository at this point
Copy the full SHA aecbaddView commit details -
Configuration menu - View commit details
-
Copy full SHA for 027b505 - Browse repository at this point
Copy the full SHA 027b505View commit details -
nostrdb/cursor: re-apply infinite loop bug fix
since I keep overwriting it by accident Signed-off-by: William Casarin <jb55@jb55.com>
Configuration menu - View commit details
-
Copy full SHA for 10b269c - Browse repository at this point
Copy the full SHA 10b269cView commit details -
nostrdb/test: disable migrate for now
Signed-off-by: William Casarin <jb55@jb55.com>
Configuration menu - View commit details
-
Copy full SHA for e77553e - Browse repository at this point
Copy the full SHA e77553eView commit details -
nostrdb/varint: switch to 64 bit varints
Signed-off-by: William Casarin <jb55@jb55.com>
Configuration menu - View commit details
-
Copy full SHA for dd89947 - Browse repository at this point
Copy the full SHA dd89947View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0853163 - Browse repository at this point
Copy the full SHA 0853163View commit details -
Signed-off-by: William Casarin <jb55@jb55.com>
Configuration menu - View commit details
-
Copy full SHA for 2531744 - Browse repository at this point
Copy the full SHA 2531744View commit details -
nostrdb/make: cleanup a bit, separate bench running
Signed-off-by: William Casarin <jb55@jb55.com>
Configuration menu - View commit details
-
Copy full SHA for add2802 - Browse repository at this point
Copy the full SHA add2802View commit details -
nostrdb/block: add bolt11 invoice encoding/decoding
Signed-off-by: William Casarin <jb55@jb55.com>
Configuration menu - View commit details
-
Copy full SHA for 782bfba - Browse repository at this point
Copy the full SHA 782bfbaView commit details -
Configuration menu - View commit details
-
Copy full SHA for 8fd8e91 - Browse repository at this point
Copy the full SHA 8fd8e91View commit details -
nostrdb/nostr_bech32: only parse up to raw bech32 buffers
We will be storing raw nostr bech32 buffers directly into nostrdb, so adapt our bech32 code to reflect this. When doing our content parsing pass, we will only look for strings and we won't allocate any intermediate buffers. Only when we write this string block to nostrdb will we actually allocate in our nostrdb output buffer (no mallocs!) Signed-off-by: William Casarin <jb55@jb55.com>
Configuration menu - View commit details
-
Copy full SHA for dde2832 - Browse repository at this point
Copy the full SHA dde2832View commit details -
nostrdb/cursor: add malloc_slice
This is the same as cursor_slice except we don't memset afterwards Signed-off-by: William Casarin <jb55@jb55.com>
Configuration menu - View commit details
-
Copy full SHA for 67bf632 - Browse repository at this point
Copy the full SHA 67bf632View commit details -
nostrdb/cursor: add pull_varint_u32
This is a varint helper that doesn't pull larger than uint32 Signed-off-by: William Casarin <jb55@jb55.com>
Configuration menu - View commit details
-
Copy full SHA for 777f8bb - Browse repository at this point
Copy the full SHA 777f8bbView commit details -
nostrdb/cursor: fix empty string pushing in push_c_str
Signed-off-by: William Casarin <jb55@jb55.com>
Configuration menu - View commit details
-
Copy full SHA for c4ad3f9 - Browse repository at this point
Copy the full SHA c4ad3f9View commit details -
nostrdb/cursor: fix some warnings
Signed-off-by: William Casarin <jb55@jb55.com>
Configuration menu - View commit details
-
Copy full SHA for ea4dbb7 - Browse repository at this point
Copy the full SHA ea4dbb7View commit details -
nostrdb/cursor: add align function
handy function for padding buffers to some byte alignment Signed-off-by: William Casarin <jb55@jb55.com>
Configuration menu - View commit details
-
Copy full SHA for 71b5b1f - Browse repository at this point
Copy the full SHA 71b5b1fView commit details -
nostrdb/search: switch to cursor_align function
Signed-off-by: William Casarin <jb55@jb55.com>
Configuration menu - View commit details
-
Copy full SHA for b2dc6b6 - Browse repository at this point
Copy the full SHA b2dc6b6View commit details -
nostrdb/Inital embedded content parser
This adds some initial code for nostrdb content parsing. We still need to write tests for encoding and decoding, so this is likely not working yet. Signed-off-by: William Casarin <jb55@jb55.com>
Configuration menu - View commit details
-
Copy full SHA for 2bc4818 - Browse repository at this point
Copy the full SHA 2bc4818View commit details -
nostrdb/nostr_bech32: parse in one pass
since we will be decoding these in realtime, let's make sure we can decode them in O(1) Signed-off-by: William Casarin <jb55@jb55.com>
Configuration menu - View commit details
-
Copy full SHA for 0886f99 - Browse repository at this point
Copy the full SHA 0886f99View commit details -
nostrdb/bech32: add some initial tests
since we modified this recently, let's add some tests to make sure we didn't break anything Signed-off-by: William Casarin <jb55@jb55.com>
Configuration menu - View commit details
-
Copy full SHA for c3e06ee - Browse repository at this point
Copy the full SHA c3e06eeView commit details -
nostrdb/content_parser: add initial db decoders
We need to pull the data out as well! Let's add some initial decoders. We still need tests to make sure it's working. Signed-off-by: William Casarin <jb55@jb55.com>
Configuration menu - View commit details
-
Copy full SHA for c2e3571 - Browse repository at this point
Copy the full SHA c2e3571View commit details -
nostrdb/parser: handle period at end of url
Fix parsing URL when encountering a period at the end of the url by setting it as disallowed from being present at the end of a URL. Some characters are disallowed to be present at the end of URLs. Presently, the period character is the only disallowed character. A character is the last character in the URL if it is followed by is_whitespace() or if it's the last character in the string. Signed-off-by: kernelkind <kernelkind@gmail.com> Tested-by: William Casarin <jb55@jb55.com> Signed-off-by: William Casarin <jb55@jb5.com> Signed-off-by: William Casarin <jb55@jb55.com>
Configuration menu - View commit details
-
Copy full SHA for 320e89b - Browse repository at this point
Copy the full SHA 320e89bView commit details -
nostrdb/blocks: add note block iterator
This adds an api that walks along and pulls compact note block data out of nostrdb. Signed-off-by: William Casarin <jb55@jb55.com>
Configuration menu - View commit details
-
Copy full SHA for 2a61fcf - Browse repository at this point
Copy the full SHA 2a61fcfView commit details -
nostrdb/bech32: fix big in bech32 size parsing
Signed-off-by: William Casarin <jb55@jb55.com>
Configuration menu - View commit details
-
Copy full SHA for 411d17b - Browse repository at this point
Copy the full SHA 411d17bView commit details -
nostrdb/parser: fix bech32 block decoding
Signed-off-by: William Casarin <jb55@jb55.com>
Configuration menu - View commit details
-
Copy full SHA for dd04f85 - Browse repository at this point
Copy the full SHA dd04f85View commit details -
nostrdb/invoice: fix crash in any-amount invoice parsing
Signed-off-by: William Casarin <jb55@jb55.com>
Configuration menu - View commit details
-
Copy full SHA for aa0ca83 - Browse repository at this point
Copy the full SHA aa0ca83View commit details -
nostrdb/header: move bech32 around
Signed-off-by: William Casarin <jb55@jb55.com>
Configuration menu - View commit details
-
Copy full SHA for ba89629 - Browse repository at this point
Copy the full SHA ba89629View commit details -
nostrdb/blocks: add total_size
Fix this mistake that we have with ndb_notes where we don't know the total size of the object Signed-off-by: William Casarin <jb55@jb55.com>
Configuration menu - View commit details
-
Copy full SHA for 7c426a9 - Browse repository at this point
Copy the full SHA 7c426a9View commit details -
nostrdb/blocks: add ndb_blocks_free
In some situations we will need to have owned note blocks. For example, when we try to fetch note blocks from the database and it's not there yet. We will need to parse the content on the spot and return an owned copy, since it will not be immediately available in the database. Add a new flag field to note blocks that lets us know if it's owned by malloc or nostrdb. We the add a free function that checks this flag and frees the object if its set. If it is not set then it doesn nothing because it likely came from the database. Signed-off-by: William Casarin <jb55@jb55.com>
Configuration menu - View commit details
-
Copy full SHA for 2c20662 - Browse repository at this point
Copy the full SHA 2c20662View commit details -
nostrdb/blocks: actually set the note block version
Version 1 to start Signed-off-by: William Casarin <jb55@jb55.com>
Configuration menu - View commit details
-
Copy full SHA for e410559 - Browse repository at this point
Copy the full SHA e410559View commit details -
nostrdb/blocks: write note blocks on ingest
When ingesting notes, parse text/longform contents and store them in nostrdb. Signed-off-by: William Casarin <jb55@jb55.com>
Configuration menu - View commit details
-
Copy full SHA for e78958e - Browse repository at this point
Copy the full SHA e78958eView commit details -
nostrdb/blocks: expose block iterator internals
so we don't need heap allocation. we will be calling this a lot in tight render loops, we don't want to be allocating on each frame. Signed-off-by: William Casarin <jb55@jb55.com>
Configuration menu - View commit details
-
Copy full SHA for f545be7 - Browse repository at this point
Copy the full SHA f545be7View commit details -
nostrdb/fix clang compile issue
Signed-off-by: William Casarin <jb55@jb55.com>
Configuration menu - View commit details
-
Copy full SHA for 2749cc8 - Browse repository at this point
Copy the full SHA 2749cc8View commit details -
nostrdb/fix: don't write the owned flag to the DB
Signed-off-by: William Casarin <jb55@jb55.com>
Configuration menu - View commit details
-
Copy full SHA for cec3f27 - Browse repository at this point
Copy the full SHA cec3f27View commit details -
nostrdb/blocks: add ndb_blocks_flags function
Signed-off-by: William Casarin <jb55@jb55.com>
Configuration menu - View commit details
-
Copy full SHA for 254097d - Browse repository at this point
Copy the full SHA 254097dView commit details -
since we have this committed now Signed-off-by: William Casarin <jb55@jb55.com>
Configuration menu - View commit details
-
Copy full SHA for 4d66214 - Browse repository at this point
Copy the full SHA 4d66214View commit details -
nostrdb/Initial nostrdb relay subscriptions
This adds some initial code for the nostrdb relay subscription monitor. When new notes are written to the database, they are checked against active subscriptions. If any of the subscriptions are matched, the note primary key is written to the inbox queue for that subscription. We also add an ndb_wait_for_notes() method that simply waits for notes to be written by the subscription monitor. Changelog-Added: Added filter subscriptions Signed-off-by: William Casarin <jb55@jb55.com>
Configuration menu - View commit details
-
Copy full SHA for 22b0d8f - Browse repository at this point
Copy the full SHA 22b0d8fView commit details -
nostrdb/test: switch reaction test to use subscriptions
Signed-off-by: William Casarin <jb55@jb55.com>
Configuration menu - View commit details
-
Copy full SHA for ce939fe - Browse repository at this point
Copy the full SHA ce939feView commit details -
nostrdb/search: don't enforce sequential tokens
This makes it a bit more flexible, but maybe we can add quoting in the future that re-enables this. Or maybe a search option Signed-off-by: William Casarin <jb55@jb55.com>
Configuration menu - View commit details
-
Copy full SHA for b7897ef - Browse repository at this point
Copy the full SHA b7897efView commit details -
nostrdb/subs: subs and monitor cleanup
We need to free these resources when we're done with them. Signed-off-by: William Casarin <jb55@jb55.com>
Configuration menu - View commit details
-
Copy full SHA for 0fa757f - Browse repository at this point
Copy the full SHA 0fa757fView commit details -
nostrdb/filters: add ndb_filter_group_init function
Signed-off-by: William Casarin <jb55@jb55.com>
Configuration menu - View commit details
-
Copy full SHA for d38c07d - Browse repository at this point
Copy the full SHA d38c07dView commit details -
nostrdb/debug: add a few more debug statement
Signed-off-by: William Casarin <jb55@jb55.com>
Configuration menu - View commit details
-
Copy full SHA for 1279c79 - Browse repository at this point
Copy the full SHA 1279c79View commit details -
nostrdb/subs: notify on profile notes as well
We missed this in the original subscription code Signed-off-by: William Casarin <jb55@jb55.com>
Configuration menu - View commit details
-
Copy full SHA for 6f55b2f - Browse repository at this point
Copy the full SHA 6f55b2fView commit details -
nostrdb/subs: always fail when calling wait_for_notes on a subid of 0
this is an invalid subscription id Signed-off-by: William Casarin <jb55@jb55.com>
Configuration menu - View commit details
-
Copy full SHA for 6be340e - Browse repository at this point
Copy the full SHA 6be340eView commit details -
nostrdb/filter: sort filter elements
If they are sorted we can do binary search when matching filters like how strfry does it. Signed-off-by: William Casarin <jb55@jb55.com>
Configuration menu - View commit details
-
Copy full SHA for 07921c2 - Browse repository at this point
Copy the full SHA 07921c2View commit details -
nostrdb/filter: use binary search for large contact list filters
This is much more efficient than linear scans Signed-off-by: William Casarin <jb55@jb55.com>
Configuration menu - View commit details
-
Copy full SHA for 52236c6 - Browse repository at this point
Copy the full SHA 52236c6View commit details -
nostrdb/filters: remove ndb_filter_group from public API
We can just use a list of filters instead when subscribing Signed-off-by: William Casarin <jb55@jb55.com>
Configuration menu - View commit details
-
Copy full SHA for 1d8a304 - Browse repository at this point
Copy the full SHA 1d8a304View commit details -
Signed-off-by: William Casarin <jb55@jb55.com>
Configuration menu - View commit details
-
Copy full SHA for a3b5cb0 - Browse repository at this point
Copy the full SHA a3b5cb0View commit details -
nostrdb/filter: don't allow adding id elements on kinds
Signed-off-by: William Casarin <jb55@jb55.com>
Configuration menu - View commit details
-
Copy full SHA for 9abacaa - Browse repository at this point
Copy the full SHA 9abacaaView commit details -
nostrdb/cursor: remove old array code
Signed-off-by: William Casarin <jb55@jb55.com>
Configuration menu - View commit details
-
Copy full SHA for d0f52aa - Browse repository at this point
Copy the full SHA d0f52aaView commit details -
nostrdb/query: extract ndb_cursor_start
This is useful for positioning LMDB cursors at the start of a query. We will be re-using this in the upcoming query code Signed-off-by: William Casarin <jb55@jb55.com>
Configuration menu - View commit details
-
Copy full SHA for d024dcb - Browse repository at this point
Copy the full SHA d024dcbView commit details -
nostrdb/cursor: fix bug when pushing last element
Signed-off-by: William Casarin <jb55@jb55.com>
Configuration menu - View commit details
-
Copy full SHA for 92e0f35 - Browse repository at this point
Copy the full SHA 92e0f35View commit details -
nostrdb/Initial nostrdb queries
Still a lot more work to do, but this is at least a proof of concept for querying nostrdb using filters. Signed-off-by: William Casarin <jb55@jb55.com>
Configuration menu - View commit details
-
Copy full SHA for 12b0228 - Browse repository at this point
Copy the full SHA 12b0228View commit details -
nostrdb/query: implement kind queries
Signed-off-by: William Casarin <jb55@jb55.com>
Configuration menu - View commit details
-
Copy full SHA for c556a14 - Browse repository at this point
Copy the full SHA c556a14View commit details -
Closes: damus-io/nostrdb#25 Signed-off-by: William Casarin <jb55@jb55.com>
Configuration menu - View commit details
-
Copy full SHA for 05eaa7a - Browse repository at this point
Copy the full SHA 05eaa7aView commit details -
nostrdb/debug: add print_kind_keys helper
I needed this for debugging kind queries Signed-off-by: William Casarin <jb55@jb55.com>
Configuration menu - View commit details
-
Copy full SHA for f6fcf47 - Browse repository at this point
Copy the full SHA f6fcf47View commit details -
nostrdb/cleanup: remove old dbscan stuff
Signed-off-by: William Casarin <jb55@jb55.com>
Configuration menu - View commit details
-
Copy full SHA for ea18168 - Browse repository at this point
Copy the full SHA ea18168View commit details -
nostrdb/filter: rename FILTER_GENERIC to FILTER_TAG
it's a bit more intuitive Signed-off-by: William Casarin <jb55@jb55.com>
Configuration menu - View commit details
-
Copy full SHA for 960ebdb - Browse repository at this point
Copy the full SHA 960ebdbView commit details -
nostrdb/index: make sure kind index is DUPSORT + INTEGERDUP
We will probably need a migration for this? Signed-off-by: William Casarin <jb55@jb55.com>
Configuration menu - View commit details
-
Copy full SHA for 325932c - Browse repository at this point
Copy the full SHA 325932cView commit details -
Instead of running queries off filters directly, we do some simple heuristics and determine a reasonable query plan for the given filter. To test this, also add a kind index query plan and add a test for it. We still need tag, author, and created_at index scans. This is up next! Signed-off-by: William Casarin <jb55@jb55.com>
Configuration menu - View commit details
-
Copy full SHA for 24ceb18 - Browse repository at this point
Copy the full SHA 24ceb18View commit details -
nostrdb/ndb: add inital query command
still very early, but works for kinds! Signed-off-by: William Casarin <jb55@jb55.com>
Configuration menu - View commit details
-
Copy full SHA for 56e95d3 - Browse repository at this point
Copy the full SHA 56e95d3View commit details -
nostrdb/query: support until for kind query plans
Signed-off-by: William Casarin <jb55@jb55.com>
Configuration menu - View commit details
-
Copy full SHA for 817a962 - Browse repository at this point
Copy the full SHA 817a962View commit details -
nostrdb/ndb: measure query performance
Signed-off-by: William Casarin <jb55@jb55.com>
Configuration menu - View commit details
-
Copy full SHA for 9275ebe - Browse repository at this point
Copy the full SHA 9275ebeView commit details -
Configuration menu - View commit details
-
Copy full SHA for ce88bf5 - Browse repository at this point
Copy the full SHA ce88bf5View commit details -
nostrdb/perf: add some flamegraph helpers to makefile
Signed-off-by: William Casarin <jb55@jb55.com>
Configuration menu - View commit details
-
Copy full SHA for a2c5588 - Browse repository at this point
Copy the full SHA a2c5588View commit details -
nostrdb/filter: don't end field if we don't have one active
Signed-off-by: William Casarin <jb55@jb55.com>
Configuration menu - View commit details
-
Copy full SHA for 81959b2 - Browse repository at this point
Copy the full SHA 81959b2View commit details -
nostrdb/query: add tag index and tag queries
Signed-off-by: William Casarin <jb55@jb55.com>
Configuration menu - View commit details
-
Copy full SHA for dbe58e8 - Browse repository at this point
Copy the full SHA dbe58e8View commit details -
nostrdb/tce: add AUTH to-client-event
This was committed to damus, but this should be in nostrdb or else we will lose it when we update. Damus: 84cfeb1 ("nip42: add initial relay auth support") Link: https://groups.google.com/a/damus.io/g/patches/c/Zx3dk01e0yg/m/t59TsVkXAQAJ Signed-off-by: Charlie Fish <contact@charlie.fish> Signed-off-by: William Casarin <jb55@jb55.com>
Configuration menu - View commit details
-
Copy full SHA for 06cff81 - Browse repository at this point
Copy the full SHA 06cff81View commit details -
nostrdb: strblock: add typedef
I don't technically need this but it helps a lot on the swift side of things since I already have code that uses this identifier of a similar structure Signed-off-by: William Casarin <jb55@jb55.com>
Configuration menu - View commit details
-
Copy full SHA for 77f199c - Browse repository at this point
Copy the full SHA 77f199cView commit details -
nostrdb: header: add ptr helpers for swift
swift is kind of dumb when it comes to opaque pointers Signed-off-by: William Casarin <jb55@jb55.com>
Configuration menu - View commit details
-
Copy full SHA for ac38513 - Browse repository at this point
Copy the full SHA ac38513View commit details -
nostrdb: blocks: add word count interface
Signed-off-by: William Casarin <jb55@jb55.com>
Configuration menu - View commit details
-
Copy full SHA for c492490 - Browse repository at this point
Copy the full SHA c492490View commit details -
nostrdb: tce: fix build for previous TCE change
Fixes: 34093cd ("tce: add AUTH to-client-event") Signed-off-by: William Casarin <jb55@jb55.com>
Configuration menu - View commit details
-
Copy full SHA for 5fbb654 - Browse repository at this point
Copy the full SHA 5fbb654View commit details -
nostrdb: port kernelkind's to the new bech32 parser
Signed-off-by: William Casarin <jb55@jb55.com>
Configuration menu - View commit details
-
Copy full SHA for 624fc38 - Browse repository at this point
Copy the full SHA 624fc38View commit details -
nostrdb: queue: switch to prot_queue_try_pop_all
This allows you to `try pop` multiple items instead of 1 Signed-off-by: William Casarin <jb55@jb55.com>
Configuration menu - View commit details
-
Copy full SHA for 5d332c3 - Browse repository at this point
Copy the full SHA 5d332c3View commit details -
nostrdb: ndb: add ndb_poll_for_notes
The polling variant of ndb_wait_for_notes. This makes more sense for realtime apps like notedeck Changelog-Added: Add ndb_poll_for_notes Signed-off-by: William Casarin <jb55@jb55.com>
Configuration menu - View commit details
-
Copy full SHA for cba051b - Browse repository at this point
Copy the full SHA cba051bView commit details -
nostrdb: filters: copy filter metadata into subscription
This fixes a few ownership issues Signed-off-by: William Casarin <jb55@jb55.com>
Configuration menu - View commit details
-
Copy full SHA for ec30d07 - Browse repository at this point
Copy the full SHA ec30d07View commit details -
nostrdb: silence annoying debug
Signed-off-by: William Casarin <jb55@jb55.com>
Configuration menu - View commit details
-
Copy full SHA for 78e86cc - Browse repository at this point
Copy the full SHA 78e86ccView commit details -
nostrdb: return number of items popped when polling
Signed-off-by: William Casarin <jb55@jb55.com>
Configuration menu - View commit details
-
Copy full SHA for 6d12e70 - Browse repository at this point
Copy the full SHA 6d12e70View commit details -
nostrdb: query: include note size in query results
Signed-off-by: William Casarin <jb55@jb55.com>
Configuration menu - View commit details
-
Copy full SHA for f13974f - Browse repository at this point
Copy the full SHA f13974fView commit details -
nostrdb: filter: add ndb_filter_end
This is a pretty scary looking function that realloc our large variable filter buffer into a compact one. This saves up a bunch of memory when we are done building the filter. Signed-off-by: William Casarin <jb55@jb55.com>
Configuration menu - View commit details
-
Copy full SHA for 3e53178 - Browse repository at this point
Copy the full SHA 3e53178View commit details -
nostrdb: filter: use relative data offsets for easy cloning
Instead of storing exact pointers inside of our filter elements, just store offsets. This will allow us to clone filters very easily without having to mess around with fixing up the pointers afterwards. Signed-off-by: William Casarin <jb55@jb55.com>
Configuration menu - View commit details
-
Copy full SHA for f95dcb2 - Browse repository at this point
Copy the full SHA f95dcb2View commit details -
nostrdb: filter: add ndb_filter_clone
Clone filters when moving them into subscriptions. This will allow us to fix the double free issue on the rust side. Signed-off-by: William Casarin <jb55@jb55.com>
Configuration menu - View commit details
-
Copy full SHA for 6e35d8c - Browse repository at this point
Copy the full SHA 6e35d8cView commit details -
nostrdb: filter: make sure to return clone errors
Signed-off-by: William Casarin <jb55@jb55.com>
Configuration menu - View commit details
-
Copy full SHA for 99b3a65 - Browse repository at this point
Copy the full SHA 99b3a65View commit details -
nostrdb: filter: make sure clone copies metadata
Signed-off-by: William Casarin <jb55@jb55.com>
Configuration menu - View commit details
-
Copy full SHA for 3b1475b - Browse repository at this point
Copy the full SHA 3b1475bView commit details -
nostrdb: random: add getrandom fallback for android
Signed-off-by: William Casarin <jb55@jb55.com>
Configuration menu - View commit details
-
Copy full SHA for 2d61b86 - Browse repository at this point
Copy the full SHA 2d61b86View commit details -
nostrdb: fix a few note size compile issues
Signed-off-by: William Casarin <jb55@jb55.com>
Configuration menu - View commit details
-
Copy full SHA for b7a432c - Browse repository at this point
Copy the full SHA b7a432cView commit details -
nostrdb: cores: just set to 2 on unknown platforms
Signed-off-by: William Casarin <jb55@jb55.com>
Configuration menu - View commit details
-
Copy full SHA for 96b46fa - Browse repository at this point
Copy the full SHA 96b46faView commit details -
nostrdb: plan: add created_at query plan
This introduces the basic created_at query plan. We scan the created_at + id index in descending order looking for items that match a filter. This is a very general query plan, but might not be very efficient for anything other than local timelines. Changelog-Added: Add general created_at query plan for timelines Closes: damus-io/nostrdb#26 Signed-off-by: William Casarin <jb55@jb55.com>
Configuration menu - View commit details
-
Copy full SHA for 1d3b6ae - Browse repository at this point
Copy the full SHA 1d3b6aeView commit details -
nostrdb: plan: use a less efficient plan for author query plans
This is less efficient for now but we don't have a small-author-list query plan yet. Signed-off-by: William Casarin <jb55@jb55.com>
Configuration menu - View commit details
-
Copy full SHA for d24f1d4 - Browse repository at this point
Copy the full SHA d24f1d4View commit details -
nostrdb: fix dubious looking parens logic
Signed-off-by: William Casarin <jb55@jb55.com>
Configuration menu - View commit details
-
Copy full SHA for 6ad8cef - Browse repository at this point
Copy the full SHA 6ad8cefView commit details -
nostrdb: build: fix compile warning
A small size_t/uint64 conversion issue Signed-off-by: William Casarin <jb55@jb55.com>
Configuration menu - View commit details
-
Copy full SHA for e1a105f - Browse repository at this point
Copy the full SHA e1a105fView commit details -
nostrdb: add ability to register a subscription callback
Since Damus iOS is not an immediate-mode UI like android, we would rather not poll for results. Instead we need a way to register a callback function that is called when we get new subscription results. This is also useful on the android side, allowing us to request a new frame to draw when we have new results, instead of drawing every second. Signed-off-by: William Casarin <jb55@jb55.com>
Configuration menu - View commit details
-
Copy full SHA for dcdf3d0 - Browse repository at this point
Copy the full SHA dcdf3d0View commit details -
Configuration menu - View commit details
-
Copy full SHA for ab89ffc - Browse repository at this point
Copy the full SHA ab89ffcView commit details -
c: remove some unused files from project
some binding dir stoppers, and configurator
Configuration menu - View commit details
-
Copy full SHA for 8cabe79 - Browse repository at this point
Copy the full SHA 8cabe79View commit details -
optimized id matching function
doesn't need to create a copy of the id Signed-off-by: William Casarin <jb55@jb55.com>
Configuration menu - View commit details
-
Copy full SHA for 41a864c - Browse repository at this point
Copy the full SHA 41a864cView commit details -
Switch over to use use blocks from nostrdb
This is still kind of broken until queries are switched over to nostrdb. Will do this next Signed-off-by: William Casarin <jb55@jb55.com>
Configuration menu - View commit details
-
Copy full SHA for 265f7ba - Browse repository at this point
Copy the full SHA 265f7baView commit details -
Configuration menu - View commit details
-
Copy full SHA for d5c6f3d - Browse repository at this point
Copy the full SHA d5c6f3dView commit details -
ndb: add subscription callback initializers
Signed-off-by: William Casarin <jb55@jb55.com>
Configuration menu - View commit details
-
Copy full SHA for 656d6c3 - Browse repository at this point
Copy the full SHA 656d6c3View commit details -
Configuration menu - View commit details
-
Copy full SHA for f81182d - Browse repository at this point
Copy the full SHA f81182dView commit details -
REMOVEME: add assert to catch potential bug
Signed-off-by: William Casarin <jb55@jb55.com>
Configuration menu - View commit details
-
Copy full SHA for d0b449c - Browse repository at this point
Copy the full SHA d0b449cView commit details -
Configuration menu - View commit details
-
Copy full SHA for c476272 - Browse repository at this point
Copy the full SHA c476272View commit details