From 2295f4b9fc3b4515d8647e0620572023b58efa1c Mon Sep 17 00:00:00 2001 From: Mike Dilger Date: Tue, 21 Jan 2025 11:42:38 +1300 Subject: [PATCH] Improve documentation around `allow_scraping` --- contrib/chorus.toml | 9 +++++---- docs/CONFIG.md | 6 +++--- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/contrib/chorus.toml b/contrib/chorus.toml index 2ec7cc3..21a321f 100644 --- a/contrib/chorus.toml +++ b/contrib/chorus.toml @@ -164,10 +164,10 @@ verify_events = true # Filter that fail to match these conditions will be rejected if allow_scraping is false. # # If allow_scraping is true, be aware that filters that don't match any of these conditions -# have no indexes to speed up their query, so they scan through every single event on the relay. +# (and are not bound by since/until/limit) have no indexes to speed up their query, so they +# scan through every single event on the relay. # -# The purpose of this setting is as a temporary setting that allows you to dump every single -# event on your relay, but the `dump` binary automatically sets it while it runs. +# See also `allow_scrape_if_limited_to` and `allow_scrape_if_max_seconds`. # # Default is false. # @@ -176,7 +176,8 @@ allow_scraping = false # This is a u32 count of events indicating a filter `limit` value under which a scrape is # allowed, irrespective of the `allow_scraping` setting. Such scrapes are not expensive due -# to the limit. +# to the limit. The limit must be specified in the filter; it does not do the scrape and +# then count to see if it was under the limit. # # See `allow_scraping` to learn the definition of a scrape. # diff --git a/docs/CONFIG.md b/docs/CONFIG.md index e3aa32b..33438c7 100644 --- a/docs/CONFIG.md +++ b/docs/CONFIG.md @@ -146,15 +146,15 @@ This is a boolean indicating whether or not scraping is allowed. Scraping is any Filter that fail to match these conditions will be rejected if `allow_scraping` is false. -If `allow_scraping` is true, be aware that filters that don't match any of these conditions have no indexes to speed up their query, so they scan through every single event on the relay. +If `allow_scraping` is true, be aware that filters that don't match any of these conditions (and are not bound by since/until/limit) have no indexes to speed up their query, so they scan through every single event on the relay. -The purpose of this setting is as a temporary setting that allows you to dump every single event on your relay. +See also `allow_scrape_if_limited_to` and # `allow_scrape_if_max_seconds`. Default is false. ### allow_scrape_if_limited_to -This is a u32 count of events indicating a filter `limit` value under which a scrape is allowed, irrespective of the `allow_scraping` setting. Such scrapes are not expensive due to the limit. +This is a u32 count of events indicating a filter `limit` value under which a scrape is allowed, irrespective of the `allow_scraping` setting. Such scrapes are not expensive due to the limit. The limit must be specified in the filter; it does not do the scrape and then count to see if it was under the limit. See `allow_scraping` to learn the definition of a scrape.