You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 112ab0e
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: CONFIGURATION.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -162,13 +162,13 @@ The settings below are listed in alphabetical order by name. Please keep this ta
162
162
| limits.event.eventId.minLeadingZeroBits | Leading zero bits required on every incoming event for proof of work. Defaults to zero. Disabled when set to zero. Ignored on the client path while `limits.event.pow.enabled` is true (mirrored events from `static-mirroring-worker.ts` still enforce this static value). |
163
163
| limits.event.kind.blacklist | List of event kinds to always reject. Leave empty to allow any. |
164
164
| limits.event.kind.whitelist | List of event kinds to always allow. Leave empty to allow any. |
165
-
| limits.event.pow.ceilingBits | Maximum adaptive PoW difficulty, reached at 2x `targetEventsPerSecond` and beyond. |
166
-
| limits.event.pow.enabled | Enables load-aware PoW difficulty scaling, applied to both eventId and pubkey checks, in place of the static `minLeadingZeroBits`values. Defaults to false. |
167
-
| limits.event.pow.floorBits | Minimum adaptive PoW difficulty, used at or under `targetEventsPerSecond`. |
165
+
| limits.event.pow.ceilingBits | Maximum adaptive PoW difficulty, reached at approximately 2x `targetEventsPerSecond` and beyond. |
166
+
| limits.event.pow.enabled | Enables load-aware PoW difficulty scaling on the eventId check only, in place of the static `eventId.minLeadingZeroBits`value. Does not affect `pubkey.minLeadingZeroBits`, which stays a static, non-adaptive knob regardless of this setting -- a pubkey requirement is a one-time offline identity cost, not a per-event load signal. Defaults to false. |
167
+
| limits.event.pow.floorBits | Minimum adaptive PoW difficulty, used at or below approximately `targetEventsPerSecond`. With the default `floorBits: 0`, the load signal costs an attacker nothing to drive; set a non-zero floor if the gate should cost something even under light load. |
168
168
| limits.event.pow.periodMs | EWMA half-life (ms) used to smooth the observed event rate. |
169
-
| limits.event.pow.targetEventsPerSecond | Event-rate threshold above which the adaptive difficulty starts climbing toward `ceilingBits`. |
169
+
| limits.event.pow.targetEventsPerSecond | Event-rate threshold (in real events/sec) above which the adaptive difficulty starts climbing toward `ceilingBits`. |
170
170
| limits.event.pubkey.blacklist | List of public keys to always reject. Public keys in this list will not be able to post to this relay. |
171
-
| limits.event.pubkey.minLeadingZeroBits | Leading zero bits required on the public key of incoming events for proof of work. Defaults to zero. Disabled when set to zero. Ignored on the client path while `limits.event.pow.enabled`is true (mirrored events from `static-mirroring-worker.ts` still enforce this static value). |
171
+
| limits.event.pubkey.minLeadingZeroBits | Leading zero bits required on the public key of incoming events for proof of work. Defaults to zero. Disabled when set to zero. Always enforced regardless of `limits.event.pow.enabled`-- adaptive PoW never applies to the pubkey check (see `limits.event.pow.enabled`). |
172
172
| limits.event.pubkey.whitelist | List of public keys to always allow. Only public keys in this list will be able to post to this relay. Use for private relays. |
173
173
| limits.event.rateLimits[].kinds | List of event kinds rate limited. Use `[min, max]` for ranges. Optional. |
174
174
| limits.event.rateLimits[].period | Rate limiting period in milliseconds. For `sliding_window`: the time window during which requests are counted. For `ewma`: the half-life of the exponential decay — shorter values forget bursts faster, longer values are stricter on bursty clients. |
/** Enables load-aware difficulty scaling; replaces the eventId/pubkey minLeadingZeroBits checks while enabled. Defaults to false. */
96
+
/** Enables load-aware difficulty scaling on the eventId check, replacing eventId.minLeadingZeroBits while enabled. Does not affect the pubkey check -- pubkey.minLeadingZeroBits stays a static, non-adaptive knob. Defaults to false. */
97
97
enabled: boolean
98
-
/** Minimum required difficulty, used at/under targetEventsPerSecond. */
98
+
/** Minimum required difficulty, used at or below approximately targetEventsPerSecond. */
99
99
floorBits: number
100
-
/** Maximum required difficulty, reached at 2x targetEventsPerSecond and beyond. */
100
+
/** Maximum required difficulty, reached at approximately 2x targetEventsPerSecond and beyond. */
101
101
ceilingBits: number
102
-
/** Event-rate threshold (same EWMA scale as limits.event.rateLimits) above which difficulty starts climbing. */
102
+
/** Event-rate threshold, in real events/sec, above which difficulty starts climbing toward ceilingBits. */
103
103
targetEventsPerSecond: number
104
104
/** EWMA half-life in ms used to smooth the observed event rate. */
0 commit comments