Monday, January 30, 2023
HomeBitcoinlightning community - The place does the max_htlc_msat subject within the getchaninfo...

lightning community – The place does the max_htlc_msat subject within the getchaninfo outcomes come from?

Utilizing an arbitrarily chosen channel, the getchaninfo command returns a json object like this:

$ lncli getchaninfo 848897743567126529
{
    "channel_id": "848897743567126529",
    "chan_point": "e39544821899c05499ed1c3271b6668aea90246bfe181b72d20463a6579496f4:1",
    "last_update": 1673788833,
    "node1_pub": "025407ac7bd16419f4ae9e7827665c031323184514618c390278ec4a2708d3558f",
    "node2_pub": "03e865ea04a93245a0685e9dd5280514a9ff0d9162c3c3c004efab2636631229ef",
    "capability": "5000000",
    "node1_policy": {
        "time_lock_delta": 34,
        "min_htlc": "1",
        "fee_base_msat": "0",
        "fee_rate_milli_msat": "842",
        "disabled": false,
        "max_htlc_msat": "4950000000",
        "last_update": 1673788833
    },
    "node2_policy": {
        "time_lock_delta": 40,
        "min_htlc": "1000",
        "fee_base_msat": "1000",
        "fee_rate_milli_msat": "300",
        "disabled": false,
        "max_htlc_msat": "5000000000",
        "last_update": 1673788419
    }
}

Excluding the disabled and last_update fields, there are 5 different fields which can be particular to every node within the channel. It seems to be like 4 of those parameters are set from settings in lnd.conf as follows:

  • time_lock_delta = bitcoin.timelockdelta
  • min_htlc = bitcoin.minhtlc
  • fee_base_msat = bitcoin.basefee
  • fee_rate_milli_msat = bitcoin.feerate

However what about max_htlc_msat? I do not see something within the lnd.conf documentation that appears prefer it might be that subject.

I assumed it could be set on the time of opening the channel, however in wanting on the assist for the openchannel command, I do not see something that appears like it could be max_htlc_msat.

$ lncli assist openchannel
NAME:
   lncli openchannel - Open a channel to a node or an present peer.

USAGE:
   lncli openchannel [command options] node-key local-amt push-amt

CATEGORY:
   Channels

DESCRIPTION:
   
  Try to open a brand new channel to an present peer with the important thing node-key
  optionally blocking till the channel is 'open'.

  One can even connect with a node earlier than opening a brand new channel to it by
  setting its host:port through the --connect argument. For this to work,
  the node_key should be offered, somewhat than the peer_id. That is optionally available.

  The channel can be initialized with local-amt satoshis native and push-amt
  satoshis for the distant node. Notice that specifying push-amt means you give that
  quantity to the distant node as a part of the channel opening. As soon as the channel is open,
  a channelPoint (txid:vout) of the funding output is returned.

  If the distant peer helps the choice upfront shutdown characteristic bit (question
  listpeers to see their supported characteristic bits), an handle to implement
  payout of funds on cooperative shut can optionally be offered. Notice that
  if you happen to set this worth, you will be unable to cooperatively shut out to
  one other handle.

  One can manually set the payment for use for the funding transaction through both
  the --conf_target or --sat_per_vbyte arguments. That is optionally available.

OPTIONS:
   --node_key worth                         the id public key of the goal node/peer serialized in compressed format
   --connect worth                          (optionally available) the host:port of the goal node
   --local_amt worth                        the variety of satoshis the pockets ought to decide to the channel (default: 0)
   --push_amt worth                         the variety of satoshis to offer the distant aspect as a part of the preliminary dedication state, that is equal to first opening a channel and sending the distant celebration funds, however achieved multi function step (default: 0)
   --block                                  block and wait till the channel is totally open
   --conf_target worth                      (optionally available) the variety of blocks that the transaction *ought to* verify in, can be used for payment estimation (default: 0)
   --sat_per_vbyte worth                    (optionally available) a handbook payment expressed in sat/vbyte that needs to be used when crafting the transaction (default: 0)
   --private                                make the channel personal, such that it will not be introduced to the larger community, and nodes aside from the 2 channel endpoints should be explicitly advised about it to have the ability to route by way of it
   --min_htlc_msat worth                    (optionally available) the minimal worth we would require for incoming HTLCs on the channel (default: 0)
   --remote_csv_delay worth                 (optionally available) the variety of blocks we would require our channel counterparty to attend earlier than accessing its funds in case of unilateral shut. If this isn't set, we are going to scale the worth in accordance with the channel dimension (default: 0)
   --max_local_csv worth                    (optionally available) the utmost variety of blocks that we'll enable the distant peer to require we wait earlier than accessing our funds within the case of a unilateral shut. (default: 0)
   --min_confs worth                        (optionally available) the minimal variety of confirmations every considered one of your outputs used for the funding transaction should fulfill (default: 1)
   --close_address worth                    (optionally available) an handle to implement payout of our funds to on cooperative shut. Notice that if this worth is about on channel open, you'll *not* be capable of cooperatively near a distinct handle.
   --psbt                                   begin an interactive mode that initiates funding by way of {a partially} signed bitcoin transaction (PSBT), permitting the channel funds to be added and signed from a {hardware} or different offline system.
   --base_psbt worth                        when utilizing the interactive PSBT mode to open a brand new channel, use this base64 encoded PSBT as a base and add the brand new channel output to it as a substitute of making a brand new, empty one.
   --no_publish                             when utilizing the interactive PSBT mode to open a number of channels in a batch, this flag instructs lnd to not publish the total batch transaction simply but. For security causes this flag needs to be set for every of the batch's transactions besides the final
   --remote_max_value_in_flight_msat worth  (optionally available) the utmost worth in msat that may be pending inside the channel at any given time (default: 0)
   --channel_type worth                     (optionally available) the kind of channel to suggest to the distant peer ("tweakless", "anchors")
   --zero_conf                              (optionally available) whether or not a zero-conf channel open needs to be tried.
   --scid_alias                             (optionally available) whether or not a scid-alias channel kind needs to be negotiated.

The openchannel command features a min_htlc_msat parameter, however no max_htlc_msat parameter. So the place does that worth come from?

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments