diff options
| author | fiatjaf <fiatjaf@gmail.com> | 2025-04-10 23:01:48 -0300 |
|---|---|---|
| committer | fiatjaf <fiatjaf@gmail.com> | 2026-02-04 19:22:23 -0300 |
| commit | c07cf7a13a81ec417493ac7a3f081d489ebeae7d (patch) | |
| tree | c44c517e328edc48579b7efa5a4d941d99bfdeb7 | |
| parent | ca0bd0fecd8b61353512a24bd1d338da0f91fb0d (diff) | |
add hyperloglog filter for counting nip22 replies to any event.
| -rw-r--r-- | 45.md | 1 |
1 files changed, 1 insertions, 0 deletions
| @@ -62,6 +62,7 @@ This NIP defines (for now) two filters eligible for HyperLogLog: | |||
| 62 | 62 | ||
| 63 | - `{"#p": ["<pubkey>"], "kinds": [3]}`, i.e. a filter for `kind:3` events with a single `"p"` tag, which means the client is interested in knowing how many people "follow" the target `<pubkey>`. In this case the `offset` will be given by reading the character at the position `32` of the hex `<pubkey>` value as a base-16 number then adding `8` to it. | 63 | - `{"#p": ["<pubkey>"], "kinds": [3]}`, i.e. a filter for `kind:3` events with a single `"p"` tag, which means the client is interested in knowing how many people "follow" the target `<pubkey>`. In this case the `offset` will be given by reading the character at the position `32` of the hex `<pubkey>` value as a base-16 number then adding `8` to it. |
| 64 | - `{"#e": ["<id>"], "kinds": [7]}`, i.e. a filter for `kind:7` events with a single `"e"` tag, which means the client is interested in knowing how many people have reacted to the target event `<id>`. In this case the `offset` will be given by reading the character at the position `32` of the hex `<id>` value as a base-16 number then adding `8` to it. | 64 | - `{"#e": ["<id>"], "kinds": [7]}`, i.e. a filter for `kind:7` events with a single `"e"` tag, which means the client is interested in knowing how many people have reacted to the target event `<id>`. In this case the `offset` will be given by reading the character at the position `32` of the hex `<id>` value as a base-16 number then adding `8` to it. |
| 65 | - `{"#E": ["<id>"], "kinds": [1111]}`, i.e. a filter for the total number of comments any specific root event has received. In this case the `offset` will be given by reading the character at the position `32` of the hex `<id>` value as a base-16 number then adding `8` to it. | ||
| 65 | 66 | ||
| 66 | ### Attack vectors | 67 | ### Attack vectors |
| 67 | 68 | ||