docs: explain dynamic Nostr index size test

This commit is contained in:
thePR0M3TH3AN
2025-07-02 14:19:34 -04:00
parent 92d47d28c7
commit 991f0bfa4c

View File

@@ -239,16 +239,22 @@ pytest -vv
### Exploring Nostr Index Size Limits ### Exploring Nostr Index Size Limits
The `test_nostr_index_size.py` test probes how large the encrypted index can `test_nostr_index_size.py` now keeps adding entries until either the Nostr
be when posted to Nostr. It requires network access and is tagged with relay or the SDK fails to publish or retrieve the encrypted index. This helps
`desktop` and `network`, so run it manually when you want to measure payload discover the practical payload ceiling (the loop stops just below the 65 kB
limits: event limit). Because each iteration pushes a larger blob to the relay, the
test is marked with both `desktop` and `network` and is not included in the
default test run.
Set `NOSTR_TEST_DELAY` to throttle how many seconds the test waits between
publishes. The default is `5` seconds, but you can lengthen it to avoid rate
limits when exploring very large indexes.
```bash ```bash
pytest -vv src/tests/test_nostr_index_size.py NOSTR_TEST_DELAY=10 pytest -vv src/tests/test_nostr_index_size.py -m "desktop and network"
``` ```
Add `-m "desktop and network"` if you normally exclude those markers. If you normally exclude those markers, remember to pass `-m "desktop and network"`.
### Automatically Updating the Script Checksum ### Automatically Updating the Script Checksum