Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose a Channel's Routing Fee Setting via listpeers #3683

Open
niftynei opened this issue Apr 30, 2020 · 7 comments
Open

Expose a Channel's Routing Fee Setting via listpeers #3683

niftynei opened this issue Apr 30, 2020 · 7 comments
Labels

Comments

@niftynei
Copy link
Collaborator

niftynei commented Apr 30, 2020

lt'd be handy to know what the feerate we're broadcasting for any particular channel is via the channel listing in listpeers.

@darosior
Copy link
Collaborator

darosior commented May 1, 2020

This time I'm sure, you can use listchannels on your scid and use the base_fee_millisatoshi and fee_per_millionth.
EDIT: However, as an user it's a really long task to inspect fees with >10 channels and I dreamed about an extension to summary which would include the fees for a quick overview :).

@niftynei
Copy link
Collaborator Author

niftynei commented May 1, 2020

Yes, I think this can best be understood as a request to add it to listpeers. Will update description

@niftynei niftynei changed the title Expose a Channel's Routing Fee Setting via RPC Expose a Channel's Routing Fee Setting via listpeers May 1, 2020
@shinghim
Copy link

shinghim commented Aug 7, 2021

When I run lightning-cli listpeers, I get something like this:

{
   "peers": [
      {
         "id": xxxxx,
         "connected": true,
         "netaddr": [
            xxxxx
         ],
         "features": xxxxx,
         "channels": [
            {
               "state": "CHANNELD_NORMAL",
               "scratch_txid": xxxxx,
               "last_tx_fee": xxxxx,
               "last_tx_fee_msat": xxxxx,
               ...
               "out_msatoshi_fulfilled": xxxxx,
               "out_fulfilled_msat": xxxxx,
               "htlcs": []
            }
         ]
      }
   ]
}

Is this the goal of this feature to add attributes so the output from lightning-cli listpeers will look something like this:

{
   "peers": [
      {
         "id": xxxxx,
         "connected": true,
         "netaddr": [
            xxxxx
         ],
         "features": xxxxx,
         "channels": [
            {
               "state": "CHANNELD_NORMAL",
               "scratch_txid": xxxxx,
               "last_tx_fee": xxxxx,
               "last_tx_fee_msat": xxxxx,
               ...
               "out_msatoshi_fulfilled": xxxxx,
               "out_fulfilled_msat": xxxxx,
               "htlcs": []

               "base_fee_millisatoshi": xxxxx.                  <---- These would be the
               "fee_per_millionth": xxxxx.                      <---- newly added attributes 
            }
         ]
      }
   ]
}

@whitslack
Copy link
Collaborator

I believe this has been implemented (in 0.10.0 maybe?). The relevant members of each element of channels are fee_base_msat and fee_proportional_millionths.

@shinghim
Copy link

yep, those are already in there. Should this issue be closed then?

@jsarenik
Copy link
Collaborator

Yes, it seems like everything is in place already:

$ lightning-cli --version                                      
v0.10.1-2-g405b914
$ lightning-cli listpeers | grep fee_                          
               "last_tx_fee_msat": "4419000msat",
               "fee_base_msat": "0msat",
               "fee_proportional_millionths": 0,
               "last_tx_fee_msat": "4419000msat",
               "fee_base_msat": "0msat",
               "fee_proportional_millionths": 0,
               "last_tx_fee_msat": "4419000msat",
               "fee_base_msat": "0msat",
               "fee_proportional_millionths": 0,
               "last_tx_fee_msat": "4419000msat",
               "fee_base_msat": "0msat",
               "fee_proportional_millionths": 0,
               "last_tx_fee_msat": "491000msat",
               "fee_base_msat": "0msat",
               "fee_proportional_millionths": 0,
               "last_tx_fee_msat": "4934000msat",
               "fee_base_msat": "0msat",
               "fee_proportional_millionths": 0,
               "last_tx_fee_msat": "840000msat",
               "fee_base_msat": "0msat",
               "fee_proportional_millionths": 0,

@ecurrencyhodler
Copy link

We should probably close this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants