bisq-network / proposals

@bisq-network improvement proposals
https://bisq.wiki/Proposals
44 stars 16 forks source link

Promote that Bisq contributors run Tor relay nodes #326

Closed chimp1984 closed 3 years ago

chimp1984 commented 3 years ago

This is a Bisq Network proposal. Please familiarize yourself with the submission and review process.

Bisq supports since long ime payment in BSQ for running a Tor relay node to support the Tor network. Unfortunately this never got traction and beside people running Tor nodes anyway I am only aware of one who added a relay.

To advertise this better I would suggest a lottery payment for anyone who starts to run a Tor relay node. The Tor nickname could be used to detect those who partizipate in that and who added new nodes (to incentivize existing nodes is good as well but I think to grow the number of nodes is a better goal).

We could look up in https://metrics.torproject.org/rs.html and search for the string 'bisq'. Any such node operator would be candidate for the lottery payment. We could just make a proofable random selection at the start of a new DAO cycle and the winner is allowed to make a BSQ request for xxx BSQ. Operational costs for a relay node is rather low (about 10 USD) but to incentivice enough people to partizipate we could pay a decent sum (e.g. 200 - 500 BSQ) to the lucky winner.

I think the alternative to simply pay for each node does not give enough incentives and the relative low operational costs would not justify the effort (and costs) for making a comp. request. We also don't want to get 100s or comp. requests for that.

To not risk that we overpay to a handful of operators we could set a goal that we want to get added 100 nodes from Bisq contributors in 3 months. If that is not reached we can drop the proposal again, otherwise it will continue each cycle. We can also start only once we have reached e.g. 30 new nodes.

A positive side effect is that it serves as a kind of advertising for Bisq and might attract new developers with Tor affinity.

There will be min. requirements for bandwidth of those nodes (e.g. a 2TB bandwidth plan seems to be good enough, such costs 10 USD at some hosters). Another requirement might be to have the node running at least 3 days to get remote bandwidth measurement (https://blog.torproject.org/lifecycle-new-relay). To proof ownership of the winner node we could require some small change in the node config which will be reflected in the monitor page in case there are multiple persons claiming to be the operator (do not expect that is needed). The random selection can use the IPv4 address (or fingerprint) and the blockhash of the first block of the cycle as selector input. Some small script should do it to run that selection algorithm. All the details can be defined in case that proposal finds support....

Btw. There are only about 7000 tor nodes. Bisq has about 500 live nodes and about 20k users downloading each release. To get 10% of nodes operated by Bisq users does not seem out of reach and would be a pretty cool achievement (of course committed users can run several nodes).

chimp1984 commented 3 years ago

Here a usefule link for relay node setup: https://github.com/coldhakca/tor-relay-bootstrap

chimp1984 commented 3 years ago

As it seems the proposal get some basic support, I would add more specifications:

The selection algorithm can be as follows:

Example with current data: Block height of cycle 23: 674 707 Block hash: 00000000000000000006572cfd4de9be2af48ed7361fb12245f20919544dbd6a Table: Screenshot 2021-04-07 at 08 27 36

Code for selecting the winner:

 String tableInput = "bisqite (1) \t593.99 KiB/s \t1d 16h \tIndia \t139.59.30.27 \t- \tFastRunningValid \t\t9001 \t0 \tRelay\n" +
                "\tbisqotte (1) \t428.68 KiB/s \t1d 16h \tUnited States \t165.232.175.109 \t- \tFastRunningValid \t\t9001 \t0 \tRelay\n" +
                "\tbisqette (1) \t400 KiB/s \t1d 18h \tNetherlands \t188.166.1.159 \t- \tFastRunningValid \t\t9001 \t0 \tRelay";
        String[] rows = tableInput.split("\n\t");
        List<Long> ipAddresses = new ArrayList<>();
        for (String row : rows) {
            String[] columns = row.split("\t");
            String col = columns[4];
            ipAddresses.add(Long.parseLong(col.replace(".", "").trim()));
        }
        Collections.sort(ipAddresses);
        BigInteger listSize = BigInteger.valueOf(ipAddresses.size());
        BigInteger hashAsBigInt = new BigInteger("00000000000000000006572cfd4de9be2af48ed7361fb12245f20919544dbd6a".getBytes());
        int winnerIndex = hashAsBigInt.mod(listSize).intValue();
        long winnerIp = ipAddresses.get(winnerIndex);

Winner would be: 165.232.175.109 If anyone can convert that java code to some script would be easier to use...

boldsuck commented 3 years ago

Here a usefule link for relay node setup: https://github.com/coldhakca/tor-relay-bootstrap

Because that was a bit outdated i updated the script for Debian buster: https://github.com/boldsuck/tor-relay-bootstrap

I set up all my relays with it: https://metrics.torproject.org/rs.html#search/TorOrDie4privacyNET

chimp1984 commented 3 years ago

Seems the proposal did not reach any momentum. 5 Bisq nodes only...

boldsuck commented 3 years ago

Nice unmetered relays in Luxembourg with FreeBSD & IPv6 :-) Do you know HardenedBSD from the emerald onion people? Hint: At frantec, you can run Tor Exit's. Please read AUP beforehand and open a ticket to francisco.

@all Cheap bare metal (not throttled at the moment) at servdiscount.