]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
hs_pow: reduce min_effort default to 1
authorMicah Elizabeth Scott <beth@torproject.org>
Tue, 28 Feb 2023 02:47:33 +0000 (18:47 -0800)
committerMicah Elizabeth Scott <beth@torproject.org>
Wed, 10 May 2023 14:38:28 +0000 (07:38 -0700)
We may want to choose something larger eventually, but 20 seemed
much too large. Very low nonzero efforts are still useful against
a script kiddie level DoS attack.

Signed-off-by: Micah Elizabeth Scott <beth@torproject.org>
src/feature/hs/hs_config.h
src/feature/hs/hs_pow.h

index 119a91565b24a0041e053c8cfef9a9305b30abb4..831f7cf9222571dc7ff7958dcdd8a060624940b3 100644 (file)
@@ -27,7 +27,7 @@
 
 /* Default values for the HS anti-DoS PoW defenses. */
 #define HS_CONFIG_V3_POW_DEFENSES_DEFAULT 0
-#define HS_CONFIG_V3_POW_DEFENSES_MIN_EFFORT_DEFAULT 20
+#define HS_CONFIG_V3_POW_DEFENSES_MIN_EFFORT_DEFAULT 1
 
 /* API */
 
index 4eb9c5faa61193002aee326d7d3c1ff8f30eefbd..92ea011b2b5e2ec7d254210a78e4e363f966191e 100644 (file)
@@ -18,7 +18,6 @@ typedef unsigned __int128 uint128_t;
 #include "lib/evloop/token_bucket.h"
 #include "lib/smartlist_core/smartlist_core.h"
 
-#define HS_POW_SUGGESTED_EFFORT_DEFAULT 20 // HRPR TODO 5000
 /* Service updates the suggested effort every HS_UPDATE_PERIOD seconds. */
 #define HS_UPDATE_PERIOD 300 // HRPR TODO Should be consensus