From 031b8f6f344ff25a1aabb0f755e46dd6d45dae20 Mon Sep 17 00:00:00 2001 From: chris-belcher Date: Mon, 18 May 2020 12:30:11 +0100 Subject: [PATCH 1/2] Update tumbler doc for the new schedule format Handles issue #571 --- docs/tumblerguide.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/tumblerguide.md b/docs/tumblerguide.md index 190587d..276520b 100644 --- a/docs/tumblerguide.md +++ b/docs/tumblerguide.md @@ -11,7 +11,7 @@ This document explains the delta to the operation of that script, which is almos In this implementation, each coinjoin has an associated "schedule" of format like this: ``` -[mixdepth, amount-fraction, N-counterparties (requested), destination address, wait time in minutes, flag indicating incomplete/broadcast/completed (0/txid/1)] +[mixdepth, amount-fraction, N-counterparties (requested), destination address, wait time in minutes, rounding, flag indicating incomplete/broadcast/completed (0/txid/1)] ``` `[]` here represents a Python list. It's recorded in files in a csv format (because in some cases users may edit). See [this](https://github.com/AdamISZ/joinmarket-clientserver/blob/master/scripts/sample-schedule-for-testnet) testnet sample given in the repo. A couple of extra notes on the format: @@ -22,6 +22,8 @@ In this implementation, each coinjoin has an associated "schedule" of format lik * 0 amounts for the second entry indicate, as for command line flags, a sweep; decimals indicate mixdepth fractions (for tumbler) +* the 6th entry, `rounding`, is how many significant figures to round the coinjoin amount to. For example a rounding of `2` means that `0.12498733` will be rounded to `0.1200000`. A rounding value of `16` means no rounding. Sweep coinjoin amounts are never rounded. + For the `sendpayment.py` script, this schedule can indeed be simply written in a file and passed as a parameter (for this reason it's likely the tumbler and sendpayment scripts can merge in future). As you can imagine, the idea for the `tumbler.py` script is simply that a tumbler *schedule* is generated, according to the same algorithm that was used in the original implementation ([code](https://github.com/AdamISZ/joinmarket-clientserver/blob/master/jmclient/jmclient/schedule.py#L61-L133)), however here it is persisted - see the next section. From f2e100ed7c6740f05d2b02717180846eef76227a Mon Sep 17 00:00:00 2001 From: Adam Gibson Date: Mon, 18 May 2020 15:06:17 +0100 Subject: [PATCH 2/2] fix sample schedule for testnet --- scripts/sample-schedule-for-testnet | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/scripts/sample-schedule-for-testnet b/scripts/sample-schedule-for-testnet index e056ddc..aba254f 100644 --- a/scripts/sample-schedule-for-testnet +++ b/scripts/sample-schedule-for-testnet @@ -19,9 +19,12 @@ # in the tumbler, to prompt the user for a new address. #index 4: waittime: a decimal value in minutes to wait, after confirmation of this # transaction, before continuing to the next. -#index 5: completion flag: 0 until the transaction is seen on the network, when it +#index 5: rounding: how many significant figures to round the coinjoin amount to. +# For example a rounding of `2` means that `0.12498733` will be rounded to `0.1200000`. +# A rounding value of `16` means no rounding. Sweep coinjoin amounts are never rounded. +#index 6: completion flag: 0 until the transaction is seen on the network, when it # is changed to the txid. This is particularly useful for the `--restart` feature # of tumbler. Then changes to 1 when tx is confirmed. #========================== -1, 110000000, 3, INTERNAL, 0.8, 0 -0, 20000000, 2, mnsquzxrHXpFsZeL42qwbKdCP2y1esN3qw, 0, 0 +1, 110000000, 3, INTERNAL, 0.8, 16, 0 +0, 20000011, 2, mnsquzxrHXpFsZeL42qwbKdCP2y1esN3qw, 0, 16, 0