From 52d7a3cd2b9b551b0e5e8d95a43ee8408484c133 Mon Sep 17 00:00:00 2001 From: Xe Iaso Date: Thu, 20 Mar 2025 09:26:39 -0400 Subject: cmd/anubis: drastically optimize proof of work (#19) * cmd/anubis: drastically optimize proof of work Closes #12 Closes #17 This drastically optimizes the proof of work check by removing the stringify call at every iteration. Additionally, this optimizes the checks by running them in parallel for as many threads as the browser has available (according to navigator.hardwareConcurrency). This also changes the redirect lag to 250 milliseconds instead of 2000 milliseconds in order to be perceptually faster. This is below the reaction time threshold of many people, so this will make the post-check success phase perceptually instant. Testing on an iPhone 7 Plus has shown that this can clear a difficulty 4 check in 3.4 seconds. This actually optimizes the check so much it may be a logistical concern for operators. * cmd/anubis/js: fix happy cachebuster logic Signed-off-by: Xe Iaso --------- Signed-off-by: Xe Iaso --- cmd/anubis/static/js/main.mjs.br | Bin 802 -> 993 bytes 1 file changed, 0 insertions(+), 0 deletions(-) (limited to 'cmd/anubis/static/js/main.mjs.br') diff --git a/cmd/anubis/static/js/main.mjs.br b/cmd/anubis/static/js/main.mjs.br index 27625da..56b6646 100644 Binary files a/cmd/anubis/static/js/main.mjs.br and b/cmd/anubis/static/js/main.mjs.br differ -- cgit v1.2.3