-
Notifications
You must be signed in to change notification settings - Fork 295
Update to latest nostrdb #2121
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
base: master
Are you sure you want to change the base?
Update to latest nostrdb #2121
Conversation
This broke a bunch of tests which I'm fixing now |
One thing I did here is add nostrdb's patch history to our local copy of nostrdb. This ensure we don't lose bisectability when updating nostrdb. I've also removed a lot of overlap between damus' C code and nostrdb, so most of the C code should be in nostrdb now. |
10bc4f4
to
c476272
Compare
1f3d846
to
f8931a6
Compare
When trying to build from rust Signed-off-by: William Casarin <[email protected]>
Closes: damus-io/nostrdb#21 Signed-off-by: William Casarin <[email protected]>
Right now it's accidently hardcoded. Fixes: 8376e5bca05c ("add "import -"") Signed-off-by: William Casarin <[email protected]>
everything will be in here soon
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 <[email protected]>
Signed-off-by: William Casarin <[email protected]>
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 <[email protected]>
otherwise build fails Signed-off-by: William Casarin <[email protected]>
since it was overwritten when we synced with damus Signed-off-by: William Casarin <[email protected]>
we will be applying a patch here as well
A lot of this was pulled from core-lightning. Not sure what is actually needed or not. Signed-off-by: William Casarin <[email protected]>
This fixes an allocation issue with ndb_filter_init_with for small page sizes. instead of allocating the buffer around pages, we allocate based on total buffer size. Fixes: f7aac3215575 ("filter: introduce ndb_filter_init_with") Signed-off-by: William Casarin <[email protected]>
We will be using this for our nip50 search support Signed-off-by: William Casarin <[email protected]>
This can be used to quicky pull the search string from a filter Signed-off-by: William Casarin <[email protected]>
No functional changes, just formatting cleanups Signed-off-by: William Casarin <[email protected]>
Add a helper for sorting search words from largest to smallest. This should help search performance. For example, let's say our search index is like so: "the pokemon is cool" the the the ... * 1000 Our root word search would have to start 1000 new recursive queries. By sorting by the largest word: pokemon pokemon pokemon ... * 10 We only have to do 10 recursive searches, assuming larger words are less common, which will likely be the case most of the time Signed-off-by: William Casarin <[email protected]>
Update fulltext search queries to include an optional filter. This can be used to narrow down the fulltext search. This is another step towards nip50 support in nostrdb. I noticed the code was exiting dubiously in certain situations... so we fix that as well. It's possible we were missing search results because of this. Signed-off-by: William Casarin <[email protected]>
This adds support for nip50 fulltext searches. This allows you to use the nostrdb query interface for executing fulltext searches instead of the typical `ndb_text_search` api. The benefits of this include a standardized query interface that also further filters on other fields in the filter. Changelog-Added: Add nip50 search filters and queries Signed-off-by: William Casarin <[email protected]>
Signed-off-by: William Casarin <[email protected]>
Signed-off-by: William Casarin <[email protected]>
Add support for type KIND for bech32-encoded entities naddr and nevent as specified in NIP-19. Co-authored-by: kernelkind <[email protected]> Signed-off-by: William Casarin <[email protected]>
some binding dir stoppers, and configurator
doesn't need to create a copy of the id Signed-off-by: William Casarin <[email protected]>
This is still kind of broken until queries are switched over to nostrdb. Will do this next Signed-off-by: William Casarin <[email protected]>
Signed-off-by: William Casarin <[email protected]>
Signed-off-by: William Casarin <[email protected]>
Signed-off-by: William Casarin <[email protected]>
Signed-off-by: William Casarin <[email protected]>
Signed-off-by: William Casarin <[email protected]>
Signed-off-by: William Casarin <[email protected]>
@danieldaquino this is ready for testing! |
looks like there are a fix issues with block parsing... |
Signed-off-by: William Casarin <[email protected]>
Fixed an iOS crash in the latest version of nostrdb. is a bus error (unaligned memory access) when trying to parse an empty json string when processing inner kind6 reposts (this is a new feature in this version of nostrdb) |
This branch updates nostrdb to the latest version
Things done and left to do:
- [ ] Switch to local relay for querying and subscriptionssaving this for laterWhat's new in this version: