joinmarket-clientserver
joinmarket-clientserver copied to clipboard
ob-watcher sybil resistance page can be pretty slow
Creating the ob-watcher sybil resistance page can be pretty slow especially on hardware like a raspberry pi
It is slow because of the calculations for "Sybil attacks from enemies within". When coding it I set the maximum "maker count" to 10 because thats when my laptop started to be slow, however raspberry pis are less powerful. However they do eventually generate the page if you wait. The calculation runs in O(N!) time.
This will be a problem for publicly-accessible ob-watcher pages which some people like to run.
One quick way to deal with this problem is to have the maximum "makercount" number be configurable from the .cfg file. Public ob-watcher pages could then reduce it down to a faster-to-generate value.
Running python 3.7.3 on an arm64 raspberry pi 4 with 8 GB ram takes about a minute for me to load the sybil resistance page.