README.md 2.1 KB
Newer Older
TDevD's avatar
TDevD committed
1 2
# whirlpool-server
Whirlpool server
zeroleak's avatar
zeroleak committed
3 4

## Usage
zeroleak's avatar
zeroleak committed
5
- create local server configuration to override default settings:
zeroleak's avatar
zeroleak committed
6
```
zeroleak's avatar
zeroleak committed
7 8
cd whirlpool-server
cp src/main/resources/application.properties ./custom.properties
zeroleak's avatar
zeroleak committed
9
```
zeroleak's avatar
zeroleak committed
10

zeroleak's avatar
zeroleak committed
11 12 13 14 15 16 17 18 19 20
- run from commandline:
```
mvn clean install -Dmaven.test.skip=true
java -jar target/whirlpool-server-0.0.1-SNAPSHOT.jar --spring.config.location=./custom.properties [--debug]
```



## Configuration
### RPC client
zeroleak's avatar
zeroleak committed
21 22 23 24 25
```
server.rpc-client.host = CONFIGURE-ME
server.rpc-client.user = CONFIGURE-ME
server.rpc-client.password = CONFIGURE-ME
```
zeroleak's avatar
zeroleak committed
26 27
The bitcoin node should be running on the same network (main or test).<br/>
The node will be used to verify UTXO and broadcast tx.
zeroleak's avatar
zeroleak committed
28

zeroleak's avatar
zeroleak committed
29
### UTXO amounts
zeroleak's avatar
zeroleak committed
30
```
zeroleak's avatar
zeroleak committed
31 32 33 34 35 36 37 38
server.round.denomination: amount in satoshis
server.round.miner-fee: miner fee (only paid by mustMix)
```
UTXO for mustMix should be founded with *server.round.denomination*<br/>
UTXO for liquidities should be founded with *server.round.denomination*+*server.round.miner-fee*

### Round limits
```
zeroleak's avatar
zeroleak committed
39 40 41
server.round.anonymity-set-target = 10
server.round.anonymity-set-min = 6
server.round.anonymity-set-max = 20
42
server.round.anonymity-set-adjust-timeout = 120
zeroleak's avatar
zeroleak committed
43

44 45
server.round.must-mix-min = 1
server.round.liquidity-timeout = 60
zeroleak's avatar
zeroleak committed
46
```
zeroleak's avatar
zeroleak committed
47 48 49
Round will start when *server.round.anonymity-set-target* (mustMix + liquidities) are registered.<br/>
If this target is not met after *server.round.anonymity-set-adjust-timeout*, it will be gradually decreased to *server.round.anonymity-set-min*.<br/>

50 51
At the beginning of the round, only mustMix can register. Meanwhile, liquidities connecting are placed on a waiting pool.<br/>
After *server.round.liquidity-timeout* or when current *anonymity-set-target* is reached, liquidities are added as soon as *server.round.must-mix-min* is reached, up to *server.round.anonymity-set-max* inputs for the round.
52 53 54 55 56 57 58

### Testing
```
server.rpc-client.mock-tx-broadcast = false
```
For testing purpose, *server.rpc-client.mock-tx-broadcast* can be enabled to mock txs instead of broadcasting it.<br/>
When enabled, server will keep whirlpool txs in memory until server restart and act as if these txs are confirmed in blockchain.