-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: basic fee settings #522
Conversation
Some questions that came up during my tests:
Validation issues:
Edit: I think I answered this myself: the absolute fee is per maker, the relative fee is in total. That makes sense, and with that the weird condition makes sense too. You don't want to overpay a single maker (hence the absolute limit) and you don't want to overpay in total (hence the relative limit). Edit 2: But the conditional in the way you phrased it still doesn't make sense, because it would override one of the limits. I don't want to overpay, period! Hence it should be:
At least in my head that makes sense. Maybe I'm still stupid. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some i18n inconsistencies in terms of number styles.
This is special case in that it will be translated to 1.001 sats/vbyte afterwards. This might be surprising to users but it was decided that this is better than telling them that the min is 1.001 from a UX point of view.
@dergigi Should be ready for a re-review now. Please adapt the phrases to whatever you think fits best.
Adapted! Thx! Still testing though (and waiting for feedback on JoinMarket-Org/joinmarket-clientserver#1360 (comment)) - but seems good so far.
Sorry.. you know.. "don't trust, verify" and all that.. Gnome Calculator certainly does not do it. I have not addressed this as of yet, as this is the standard behaviour of html input elements with |
Notation and thus formatting (and thus input behavior) depends on i18n, see this and this and this. These local differences are, of course, why stuff like Support for all these i18n details in terms of input for HTML forms is still abysmal and will depend on your browser, see the table included in this post and this open issue at bugzilla.
By the way, the suggestion in this post is to always explicitly set a locale such as In any case, while I think this stuff is interesting, it is truly unimportant. We definitely have bigger fish to fry 😅 |
Hey.. thanks for taking the time to explain. I tried setting Edit: Just works in Firefox, had no luck with Chrome. I'll push the change for this form, and after merging this, will update all other forms to include the |
I realize that JoinMarket uses the same parameter for "block target" and "sats/vByte", but it feels weird that one overrides the other in the interface. Example: if I set the block target to 3 blocks, switch to sats/vByte, it will be set to 3 sats/vByte. If I change that now to 10 sats/vByte and switch back to the block target setting, the block target is now set to 10 blocks. All that being said, I'm tempted to merge this soon and make these kinds of improvements in follow-up PRs. |
Note to self: we should mention the defaults of all values in the interface. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me ✅
Great job @theborakompanioni 👏
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Final changes look good to me too. I'll go ahead and merge this now.
Partly addresses #518.
This PR is a first attempt to let users adapt some (not all) fee related settings:
Namely:
tx_fees
tx_fees_factor
max_cj_fee_abs
max_cj_fee_rel
Please help with the fee settings description if you can. Most of it is taken from JM config file comments with just minor adaptions. Any improvement is highly appreciated.
Questions on arbitrarily chosen min/max values (mainly to prevent unintended inputs):
tx_fees_factor
: Current implementation has min. of 10%. Should values below be allowed? e.g. zero means, that no fee randomization is done. Zero is also handled fine by JM.max_cj_fee_rel
: Currently max of50%
. Increase/decrease?tx_fees
: Currently max of100 sats/vbyte
. Increase/decrease? No upper limit? There is a config valueabsurd_fee_per_kb
which translates to350 sats/vbyte
by default.. maybe take this settings value as an upper limit?📸
Tests
1.12 sats/vbyte
with 12% rate variance:42 blocks
:max_cj_fee_abs
to249 sats
) (below the default order with abs fee 250sats) andmax_cj_fee_rel
to0.0002%
to trigger an error when attempting a collaborative tx with123456789 sats
:max_cj_fee_abs
to251sats
: Success!