From 83171090a0ff9cb9aeca3c1f91edff769076a5a7 Mon Sep 17 00:00:00 2001 From: tv Date: Sun, 8 Nov 2026 19:26:29 +0000 Subject: state: limit refused writes per user A write every node would refuse is rolled back by forking the document at the heads before it, under the write lock, at a cost that grows with the document's history. A user could ask for such writes in a loop. Count each user's refused writes over the last minute. Past --refused-writes-per-minute (default 10), its writes are answered 429 without being tried, until the oldest refusal leaves the minute. --- docs/example.toml | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'docs/example.toml') diff --git a/docs/example.toml b/docs/example.toml index 70d65b2..c152b8b 100644 --- a/docs/example.toml +++ b/docs/example.toml @@ -105,6 +105,11 @@ htpasswd = "/etc/continuum/htpasswd" # together at most. # key-logins-per-user = 100 +# Writes a user may have refused within a minute because every node would refuse them +# (docs/access.md); past it, its writes are answered 429 untried for a while. Each +# refusal costs a copy of the document. +# refused-writes-per-minute = 10 + # The hash of the swarm's genesis change (hex, as its genesis node logs it and GET # /admin/epochs shows it): joining with an empty document, the only root this node # takes. Without, the one its peers name, none while they name different ones -- cgit v1.3.1