JoinMarket-Org / joinmarket-clientserver

Bitcoin CoinJoin implementation with incentive structure to convince people to take part
GNU General Public License v3.0
717 stars 175 forks source link

ob-watcher sybil resistance page can be pretty slow #959

Open chris-belcher opened 3 years ago

chris-belcher commented 3 years ago

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.

sangaman commented 2 years ago

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.