Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
multi: switch to sat/kw fees #1644
In this PR, 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.
referenced this pull request
Jul 30, 2018
Did an initial pass through, and the set of changes reads well to me. We'll need to follow up with an additional few rounds of testing to ensure that we're not introducing some weird fee regression as a side effect of this PR.
I also updated the PR description to include the two issues that this directly affects. Once this goes in, I consider those to issues fixed for future users. However, for existing users that have already run into these issues, we may want to create a follow up patch (a component of the utxo pool really) which will simply re-sign if the fee is too low.
nice set of changes! conversion looks solid, my comments are mostly about making the units more explicit