Commit Graph

17 Commits

Author SHA1 Message Date
Olaoluwa Osuntokun
de92dac6a8
lnwallet: fix logging message for fee floor 2018-08-23 19:38:13 -07:00
Wilmer Paulino
b3d5d7ab9c
lnwallet: switch fee estimation to return sat/kw fee rates
In this commit, we modify our FeeEstimator interface to return an
estimated fee rate in sat/kw. Recently, due to low fees on the network,
users have been experiencing failures broadcasting transactions due to
not meeting specific fee requirements. This was happening more often
than not, as the estimated fee returned by backend nodes (bitcoind and
btcd) only takes into account vbytes, rather than weight. The fees
returned are also expressed in sat/kb, so we must take care that we do
not lose precision while converting to sat/kw. In the event that this
happens, a fee floor of 253 sat/kw has been added. This fee rate
originates from bitcoind rounding up the conversion from weight to
vbytes.
2018-08-09 17:29:48 -07:00
Olaoluwa Osuntokun
6f60f139f4 multi: switch over import paths from roasbeef/* to btcsuite/* 2018-07-13 17:05:39 -07:00
Wilmer Paulino
3c33a8cb67
lnwallet: enforce backend node's min relay fee floor
In this commit, we fix an issue where sometimes transactions wouldn't
provide enough of a fee to be relayed by the backend node. This would
especially cause issues when sweeping outputs after a contract breach,
etc.

Now, we'll fetch the minimum relay fee from the backend node and ensure
it is set as a lower bound if the estimated fee ends up dipping below
it.
2018-05-14 14:20:18 -04:00
Dimitris Tsapakidis
4009f7f874 multi: fix typos in comments 2018-04-17 19:03:27 -07:00
Johan T. Halseth
68557e43c1
lnwallet: add feerate types, make estimator return sat/vbyte 2018-02-26 22:42:24 +01:00
practicalswift
a93736d21e multi: comprehensive typo fixes across all packages 2018-02-06 19:11:11 -08:00
Olaoluwa Osuntokun
63fe8aec5b
lnwallet: properly use in KB, not KiB to convert to sat/byte for bitcoind estimator
In this commit, we fix an existing bug. The fee estimation within
bitcoind is based on fee/KB (1000), not fee/KiB (1024).

Pointed out by @dabura667.
2018-01-28 14:53:58 -08:00
Alex
187f59556a multi: add bitcoind drivers and tests 2018-01-15 13:59:34 -08:00
Matt Drollette
adf0d98194 multi: fix several typos in godoc comments 2017-12-17 18:40:05 -08:00
Olaoluwa Osuntokun
b8bed9a677
lnwallet: in BtcdFeeEstimator is sat/byte is too low, fallback to default rate
In this commit, we fix an existing bug within the EstimateFeePerWeight
method for the BtcdFeeEstimator. If the sat/byte value returned was too
low, then it was possible for us to end up with a zero valued
sat/weight. We correct this issue by detecting, and falling back to the
default fee rate if so.
2017-11-30 22:13:00 -08:00
Olaoluwa Osuntokun
52e6cb1a06
lnwallet: correct BTC -> SAT conversion in BtcdFeeEstimator
In this commit, we correct the BTC -> SAT conversion in
BtcdFeeEstimator. Previously, we use 10e8 instead of 1e8, causing us to
be off by an order of magnitude.
2017-11-26 14:08:57 -06:00
Olaoluwa Osuntokun
78ccfb4989
lnwallet: add BtcdFeeEstimator implementation of FeeEstimator interface
In this commit, we add a new implementation of the FeeEstimator
interface: the BtcdFeeEstimator. This implementation of the
FeeEstimator is backed by an active bcd instance. Any requests to query
for the current fee for a given confirmation target are proxied to this
active bcd instance.
2017-11-23 23:10:02 -06:00
Olaoluwa Osuntokun
e20448ebc6
lnwallet: update StaticFeeEstimator to adhere to new FeeEstimator interface 2017-11-23 23:10:02 -06:00
Olaoluwa Osuntokun
b4855b687e
lnwallet: add Start() and Stop() method to the FeeEstimator interface 2017-11-23 23:10:01 -06:00
Olaoluwa Osuntokun
0713c8c7ce
lnwallet: extend FeeEstimator methods to be able to return an error
In this commit, we extend the FeeEstimator methods to allow them to
return an error. This is required as most implementations aside from
the static fee estimator will want to be able to return errors to users
to indicate the inability to properly estimate fees.
2017-11-23 23:10:01 -06:00
Olaoluwa Osuntokun
6ef2770e57 lnwallet: move FeeEstimator into distinct file
In this commit, we move the FeeEstimator interface into a distinct file
as follow up commits will begin to flesh out the interface with
additional implementations.
2017-11-23 22:58:54 -06:00