clightning4j / btcli4j

It is a core lightning plugin to override Bitcoin backend plugin with esplora by Blockstream and give the possibility to make the running process with bitcoind in pruning mode more solid.
GNU General Public License v2.0
9 stars 7 forks source link

`estimatefees` has changed in CLN version v23.05. #79

Open tonyaldon opened 1 year ago

tonyaldon commented 1 year ago

estimatefees has changed in CLN version v23.05.

See deprecated section in https://github.com/ElementsProject/lightning/blob/master/CHANGELOG.md#23051---2023-06-05-austin-texas-agreementatxa-ii.

The new spec is (https://github.com/ElementsProject/lightning/blob/master/doc/PLUGINS.md#estimatefees):

estimatefees

Polled by lightningd to get the current feerate, all values must be passed in sat/kVB.

The plugin must return feerate_floor (e.g. 1000 if mempool is empty), and an array of 0 or more feerates. Each element of feerates is an object with blocks and feerate, in ascending-blocks order, for example:

{
    "feerate_floor": <sat per kVB>,
    "feerates": {
        { "blocks": 2, "feerate": <sat per kVB> },
        { "blocks": 6, "feerate": <sat per kVB> },
        { "blocks": 12, "feerate": <sat per kVB> }
        { "blocks": 100, "feerate": <sat per kVB> }
    }
}

lightningd will currently linearly interpolate to estimate between given blocks (it will not extrapolate, but use the min/max blocks values).

vincenzopalazzo commented 1 year ago

yeah correct, I did not have time to do it :) but I will do thanks to report it