1
0
Fork 0
mirror of https://github.com/ACINQ/eclair.git synced 2025-02-24 14:50:46 +01:00
eclair/eclair-core
Fabrice Drouin 3bf8db3f26
Set a minimum feerate-per-kw of 253 (fixes #602) (#608)
* set a minimum feerate-per-kw of 253 (fixes #602)

why 253 and not 250 since feerate-per-kw is feerate-per-kb / 250 and the minimum relay fee rate is 1000 satoshi/Kb ?

because bitcoin core uses neither the actual tx size in bytes or the tx weight to check fees, but a "virtual size" which is (3 * weight) / 4 ...

so we want :
fee > 1000 * virtual size
feerate-per-kw * weight > 1000 * (3 * weight / 4)
feerate_per-kw > 250 + 3000 / (4 * weight)

with a conservative minimum weight of 400, we get a minimum feerate_per-kw of 253

* set minimum fee rate to 2 satoshi/byte

users can still change it to 1 satoshi/byte

* use better weight estimations when computing fees

* test that tx fees are above min-relay-fee

* check that remote fee updates are above acceptable minimum

we need to check that their fee rate is always above our absolute minimum threshold
or we will end up with unrelayable txs

* fix ClaimHtlcSuccessTx weight computation

* channel tests: use actual minimum fee rate

test with our absolute minimum fee rate (253), it should be valid and anything below
sould be invalid and trigger and specific error
2018-05-30 13:38:40 +02:00
..
src Set a minimum feerate-per-kw of 253 (fixes #602) (#608) 2018-05-30 13:38:40 +02:00
eclair-cli Make eclair-cli executable (#382) 2018-01-20 23:37:21 +01:00
pom.xml back to SNAPSHOT 2018-05-18 15:53:02 +02:00