-
Notifications
You must be signed in to change notification settings - Fork 99
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
config: add maxReqFilterSize #133
Conversation
newer nixpkgs have flatbuffers set to v24 which doesn't work
Add a configurable option for expanding the number of allowed filters in REQ. The motivation here is to support queries of this nature: ["REQ", "last-note-from-each-user", { "authors": [ "a" ], "kinds": [ 1 ], "limit": 1 }, { "authors": [ "b" ], "kinds": [ 1 ], "limit": 1 }, { "authors": [ "c" ], "kinds": [ 1 ], "limit": 1 }, { "authors": [ "d" ], "kinds": [ 1 ], "limit": 1 }, { "authors": [ "e" ], "kinds": [ 1 ], "limit": 1 }, { "authors": [ "f" ], "kinds": [ 1 ], "limit": 1 }, { "authors": [ "g" ], "kinds": [ 1 ], "limit": 1 }, { "authors": [ "h" ], "kinds": [ 1 ], "limit": 1 }, { "authors": [ "i" ], "kinds": [ 1 ], "limit": 1 } ... * 1000 ]
YES!!! |
Lol vitor i knew you would like this one. Please don't DoS me. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! I believe this param can be hot reloaded safely. I will test that and if so remove the noReload
. Maybe we should up the default too?
yeah 20 seems a bit small, especially if we want to do these kinds of queries, up to you! |
20 -> 1000 :) |
This function creates filters for the base our first algo in Damus: Called "last N note per pubkey". I don't have a better name for it. This function generates a query in the form: [ {"authors": ["author_a"], "limit": 1, "kinds": [1] , {"authors": ["author_b"], "limit": 1, "kinds": [1] , {"authors": ["author_c"], "limit": 1, "kinds": [1] , {"authors": ["author_c"], "limit": 1, "kinds": [1] ... ] Due to an unfortunate restriction currently in nostrdb and strfry, we can only do about 16 to 20 of these at any given time. I have made this limit configurable in strfry[1]. I just need to do the same in nostrdb now. [1] hoytech/strfry#133 Changelog-Added: Add last_n_per_pubkey_from_tags algo function
This function creates filters for the base our first algo in Damus: Called "last N note per pubkey". I don't have a better name for it. This function generates a query in the form: [ {"authors": ["author_a"], "limit": 1, "kinds": [1] , {"authors": ["author_b"], "limit": 1, "kinds": [1] , {"authors": ["author_c"], "limit": 1, "kinds": [1] , {"authors": ["author_c"], "limit": 1, "kinds": [1] ... ] Due to an unfortunate restriction currently in nostrdb and strfry, we can only do about 16 to 20 of these at any given time. I have made this limit configurable in strfry[1]. I just need to do the same in nostrdb now. [1] hoytech/strfry#133 Changelog-Added: Add last_n_per_pubkey_from_tags algo function
This function creates filters for the base our first algo in Damus: Called "last N note per pubkey". I don't have a better name for it. This function generates a query in the form: [ {"authors": ["author_a"], "limit": 1, "kinds": [1] , {"authors": ["author_b"], "limit": 1, "kinds": [1] , {"authors": ["author_c"], "limit": 1, "kinds": [1] , {"authors": ["author_c"], "limit": 1, "kinds": [1] ... ] Due to an unfortunate restriction currently in nostrdb and strfry, we can only do about 16 to 20 of these at any given time. I have made this limit configurable in strfry[1]. I just need to do the same in nostrdb now. [1] hoytech/strfry#133 Changelog-Added: Add last_n_per_pubkey_from_tags algo function
Add a configurable option for expanding the number of allowed filters in REQ.
The motivation here is to support queries of this nature: