Commit Graph

17 Commits

Author SHA1 Message Date
Tommy Volk
9a10c80bcb multi: move many t.Fatalf calls to require.NoError 2022-06-17 04:26:55 +00:00
Oliver Gugger
7dfe4018ce
multi: use btcd's btcec/v2 and btcutil modules
This commit was previously split into the following parts to ease
review:
 - 2d746f68: replace imports
 - 4008f0fd: use ecdsa.Signature
 - 849e33d1: remove btcec.S256()
 - b8f6ebbd: use v2 library correctly
 - fa80bca9: bump go modules
2022-03-09 19:02:37 +01:00
Oliver Gugger
895a2e497b
multi: formatting and comment fixes 2022-02-10 11:02:02 +01:00
Elle Mouton
2449e66d29
lnwallet+docs: minrelayfee always above fee floor
The minimum relay fee is always ensured to be above our fee floor except
in the very first min relay fee query to bitcoind. This commit ensures
that the fee floor is respected in this first query.
2021-12-13 08:22:34 +02:00
yyforyongyu
7e7fca78c4
chainfee: update test TestWebAPIFeeEstimator 2021-12-07 20:18:24 +08:00
yyforyongyu
655ce00220
chainfee: handle conf target not found in cache 2021-12-07 20:18:24 +08:00
Elle Mouton
ad2859c863
chainfee: fetch fresh relay fee for btcd
This commit adds a function to the BtcdEstimator that fetches the
current min relay fee from the btcd node.
2021-10-05 18:30:41 +02:00
Elle Mouton
55077d9404
chainfee: fetch new relay fee from bitcoind
This commit adds a fetchMinMempoolFee function to the BitcoindEstimator
that fetches the current min mempool fee from the bitcoind backend. The
commit then also updates the BitcoindEstimator to use a minFeeManager
for it's minFeeManager member and uses the fetchMinMempoolFee function
to initialise this.
2021-10-05 18:30:41 +02:00
Elle Mouton
c01699853d
chainfee: add minFeeManager
This commit adds a minFeeManager which holds a copy of minFeePerKW
and updates this fee every few calls.
2021-10-05 18:30:41 +02:00
yyforyongyu
1abc5f8b00
chainfee: change min conf target to be 1
This commit changes the minBlockTarget used by the WebAPIEstimator to be
1, inline with the bitcoind's accepted min conf target.
2021-06-29 20:25:46 +08:00
yyforyongyu
5f0561fdbc
chainfee: replace conf target when it exceeds the maxBlockTarget
In this commit, we add a check inside EstimateFeePerKW for bitcoind so
that when the conf target exceeds the maxBlockTarget, we will use
maxBlockTarget instead.
2021-06-29 20:25:46 +08:00
yyforyongyu
6242158d51
chainfee: fix maxBlockTarget value 2021-06-29 20:25:45 +08:00
Joost Jager
166be979dd
lnwallet: add no cache option to web api estimator 2020-09-14 11:51:03 +02:00
Joost Jager
23cd2f40eb
lnwallet: remove unused WebAPIEstimator field 2020-09-14 11:51:01 +02:00
Conner Fromknecht
89bd58786e
lnwallet/channel: enforce absolute fee floor of 250 sat/kw
This enforces the _actualized_ fee rate of the  commitment transaction,
rather than the fee floor used for estimation. The new value of 250
sat/kw corresponds to 1 sat/byte, rather than 253 which is only rounded
up during estimation to account for the fact that BOLT 3 rounds down to
the nearest satoshi and that the vbyte fee estimation is lossy.

Previously we would incorrectly fail to sign the next commitment even
though the fee was technically high enough. Restarting with this commit
should solve the issue as long as the channel hasn't already gone to
chain.
2020-04-21 12:37:34 -07:00
yyforyongyu
97da7b3444 multi: support config bitcoind fee estimate mode 2020-03-25 14:59:23 +08:00
Olaoluwa Osuntokun
777ed104a3
chainfee: create new chainfee package extracting fees from lnwallet
In this commit, we create a new chainfee package, that houses all fee
related functionality used within the codebase. The creation of this new
package furthers our long-term goal of extracting functionality from the
bloated `lnwallet` package into new distinct packages. Additionally,
this new packages resolves a class of import cycle that could arise if a
new package that was imported by something in `lnwallet` wanted to use
the existing fee related functions in the prior `lnwallet` package.
2019-10-31 16:41:57 -07:00