[bisq-network/proposals] Promote that Bisq contributors run Tor relay nodes (#326)

chimp1984 notifications at github.com
Wed Apr 7 15:46:41 CEST 2021


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

- Once there are > 30 nodes with "bisq" in the relay nickname at a new DAO cycle the **Tor-boost-initiative** starts
- At beginning of a new DAO cycle the compensation request maintainer takes all the nodes found at https://metrics.torproject.org/rs.html#search/bisq%20flag:fast have flag 'fast' and have an uptime > 3 days
- Easiest would be to use the IPv4 address for the winner selection as that is visible in the table result (for the fingerprint each node details need to be opened). As selector input we can use the blockhash of the first block of the new cycle.  
- The winner will be announced in the Github comp request issues (additional promotion can be done but is not mandatory) and is permitted to file a compensation request of 10 USD x number of nodes but not more than 1000 USD (will get converted to BSQ with cycles rate) for that cycle.  If there are 30 nodes its 300 USD, if there are 100 nodes its 1000 USD...
- If there are not at least 30 nodes the cycle will be dropped and continued once 30 nodes are reached again.
- Bisq can stop the initiative any time, specially if it does not lead to the intended effect to increase the total number of Tor nodes (e.g. if nodes just rename their nickname)
- In case there would be multiple candidates claiming to be the operator of the winner IP they have to add a short random challenge nonce the maintainer publishes on Github to append to their nickname, so only the one who has access to the node can do that.  

The selection algorithm can be as follows: 
- Create sorted list from ip addresses (remove '.' and parse it as long value)
- Convert the block hash to a Big Integer and make modulo the size of the list of ip addresses.
- Use the result as index to pick the winner from the list 

Example with current data:
Block height of cycle 23: `674 707`
Block hash: `00000000000000000006572cfd4de9be2af48ed7361fb12245f20919544dbd6a`
Table: <img width="1168" alt="Screenshot 2021-04-07 at 08 27 36" src="https://user-images.githubusercontent.com/54558767/113874180-2441dd80-977b-11eb-92e0-d458b6b09dfc.png">

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...

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/bisq-network/proposals/issues/326#issuecomment-814927448
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bisq.network/pipermail/bisq-github/attachments/20210407/e070e9a4/attachment.htm>


More information about the bisq-github mailing list