Browse Source

Set txfee threshold to 1000 instead of 144

Core's fee estimation RPC calls accept arguments up to
1008 blocks so it doesn't make sense to limit to 144 blocks.
master
chris-belcher 6 years ago
parent
commit
cf54789c85
No known key found for this signature in database
GPG Key ID: EF734EA677F31129
  1. 4
      docs/PAYJOIN.md
  2. 2
      docs/USAGE.md
  3. 4
      jmclient/jmclient/blockchaininterface.py
  4. 2
      jmclient/jmclient/configure.py

4
docs/PAYJOIN.md

@ -220,11 +220,11 @@ about 2-3x higher); this may be changed to share the fee, in a future version. T
isn't *too* high.
In the joinmarket.cfg file, under `[POLICY]` section you should see a setting called `tx_fees`.
You can set this to any integer; if you set it to a number less than 144, it's treated as a "confirmation in N blocks target",
You can set this to any integer; if you set it to 1000 or less then it's treated as a "confirmation in N blocks target",
i.e. if you set it to 3 (the default), the fee is chosen from Bitcoin Core's estimator to target confirmation in 3 blocks.
So if you change it to e.g. 10, it will be cheaper but projected to get its first confirmation in 10 blocks on average.
If you set it to a number >= 144, though, it's a number of satoshis per kilobyte (technically, kilo-vbyte) that you want
If you set it to a number > 1000, though, it's a number of satoshis per kilobyte (technically, kilo-vbyte) that you want
to use. **Don't use less than about 1200 if you do this** - a typical figure might be 5000 or 10000, corresponding to
about 5-10 sats/byte, which nowadays is a reasonable fee. The exact amount is randomised by ~20% to avoid you inadvertently
watermarking all your transactions. So don't use < 1200 because then you might be using less than 1 sat/byte which is

2
docs/USAGE.md

@ -370,7 +370,7 @@ There are two different types of fee; bitcoin network transaction fees and fees
#### Bitcoin network fees.
This is controlled using the setting of `tx_fees` in the `[POLICY]` section in your `joinmarket.cfg` file in the current directory. If you set it to a number between 1 and 144 it is treated as the targeted number of blocks for confirmation; e.g. if you set it to 20 you are asking to use whatever Bitcoin Core things is a realistic fee to get confirmation within the next 20 blocks. By default it is 3. If you set it to a number > 144, don't set it lower than about 1200, it will be interpreted as "number of satoshis per kilobyte for the transaction fee". 1000 equates to 1 satoshi per byte (ignoring technical details of vbyte), which is usually the minimum fee that nodes on the network will relay. Note that Joinmarket will deliberately vary your choice randomly, in this case, by 20% either side, to avoid you watermarking all your transactions with the exact same fee rate. As an example, if you prefer to use an approximate rate of 20 sats/byte rather than rely on Bitcoin Core's estimated target for 3 or 6 blocks, then set `tx_fees` to 20000.
This is controlled using the setting of `tx_fees` in the `[POLICY]` section in your `joinmarket.cfg` file in the current directory. If you set it to a number between 1 and 1000 it is treated as the targeted number of blocks for confirmation; e.g. if you set it to 20 you are asking to use whatever Bitcoin Core things is a realistic fee to get confirmation within the next 20 blocks. By default it is 3. If you set it to a number > 1000, don't set it lower than about 1200, it will be interpreted as "number of satoshis per kilobyte for the transaction fee". 1000 equates to 1 satoshi per byte (ignoring technical details of vbyte), which is usually the minimum fee that nodes on the network will relay. Note that Joinmarket will deliberately vary your choice randomly, in this case, by 20% either side, to avoid you watermarking all your transactions with the exact same fee rate. As an example, if you prefer to use an approximate rate of 20 sats/byte rather than rely on Bitcoin Core's estimated target for 3 or 6 blocks, then set `tx_fees` to 20000.
Note that some liquidity providers (Makers) will offer very small contributions to the tx fee, but mostly you should consider that you must pay the whole Bitcoin network fee yourself, as an instigator of a coinjoin (a Taker). Note also that if you set 7 counterparties, you are effectively paying for approximately 7 normal sized transactions; be cognizant of that!
#### CoinJoin fees.

4
jmclient/jmclient/blockchaininterface.py

@ -204,10 +204,10 @@ class BlockchainInterface(object):
'''
def fee_per_kb_has_been_manually_set(self, N):
'''if the 'block' target is higher than 144, interpret it
'''if the 'block' target is higher than 1000, interpret it
as manually set fee/Kb.
'''
if N > 144:
if N > 1000:
return True
else:
return False

2
jmclient/jmclient/configure.py

@ -195,7 +195,7 @@ merge_algorithm = default
# per kB are needed to get in one of the next N blocks, N set here
# as the value of 'tx_fees'. This cost estimate is high if you set
# N=1, so we choose 3 for a more reasonable figure, as our default.
# You can also set your own fee/kb: any number higher than 144 will
# You can also set your own fee/kb: any number higher than 1000 will
# be interpreted as the fee in satoshi per kB that you wish to use
# example: N=30000 will use 30000 sat/kB as a fee, while N=5
# will use the estimate from your selected blockchain source

Loading…
Cancel
Save