Skip to content

lnd updatechanpolicy has confusing --help #1523

@abrkn

Description

@abrkn

Background

lncli updatechanpolicy states that the default --time_lock_delta is 0:

--time_lock_delta value  the CLTV delta that will be applied to all forwarded HTLCs (default: 0)

However:

lncli updatechanpolicy --fee_rate 0.001 --base_fee_msat 100000 --time_lock_delta 0```

results in

[lncli] rpc error: code = Unknown desc = time lock delta of 0 is too small, minimum supported is 4


### Your environment

lncli version 0.4.2 commit=a0b2fadea35fa4642daf4e9f56e6ecfe31d22ce1


### Steps to reproduce

lncli updatechanpolicy --fee_rate 0.001 --base_fee_msat 100000 --time_lock_delta 0```

Expected behaviour

Unsure

Actual behaviour

Error. See above.

Activity

Roasbeef

Roasbeef commented on Jul 8, 2018

@Roasbeef
Member

You can't have a value of 0 for the CLTV delta. If you did, then you'd be exposed to losing funds on each HTLC you forward, as a race condition is introduced if you ever need to go to the chain for an outgoing HTLC.

Roasbeef

Roasbeef commented on Jul 8, 2018

@Roasbeef
Member

That's the default value for the cli, not lnd default values. You can see the default values for those fields at lnd -h:

      --bitcoin.minhtlc=                                      The smallest HTLC we are willing to forward on our channels, in millisatoshi (default: 1000)
      --bitcoin.basefee=                                      The base fee in millisatoshi we will charge for forwarding payments on our channels (default: 1000)
      --bitcoin.feerate=                                      The fee rate used when forwarding payments on our channels. The total fee charged is basefee + (amount * feerate / 1000000), where amount is the forwarded amount. (default: 1)
      --bitcoin.timelockdelta=                                The CLTV delta we will subtract from a forwarded HTLC's timelock value (default: 144)

We don't display these values there as it would require lncli to read the config for lnd to see if they user has modified these values.

Roasbeef

Roasbeef commented on Jul 8, 2018

@Roasbeef
Member

You don't need to set a value, if you aren't actually modifying it.

added
documentationDocumentation changes that do not affect code behaviour
P4low prio
beginnerIssues suitable for new developers
on Jul 10, 2018
ctrlbreak-

ctrlbreak- commented on Jan 3, 2019

@ctrlbreak-

Came here to report the following. Unfortunately, I don't believe you can actually omit the argument:

lnd@LNDMainnet:~$ lncli updatechanpolicy --base_fee_msat=1999 --fee_rate=0.000042
[lncli] time_lock_delta argument missing

... if you refer to the lncli help and try to specify the stated default, it won't let you. Perhaps simply update the lncli help to refer to a sane default value of 144?

dognip

dognip commented on Jan 4, 2019

@dognip

agree with ctrlbreak, you can't leave it blank and it tries to prompt you to 0... As an aside, a fee rate of 0.000042 is actually 0.000000000042 satoshis per satoshi sent correct? Am I understanding this correctly? I have mine at 1000, which if I'm correct means I earn 1 satoshi for every 1000 satoshi relayed (ignoring base fee).

halseth

halseth commented on Jan 8, 2019

@halseth
Contributor

Reopen to properly set the default value.

reopened this on Jan 8, 2019
added 2 commits that reference this issue on Feb 26, 2019

Close issue lightningnetwork#1523 - Sane time_lock_delta default

01896c3

Merge pull request #1 from lundy405/patch-1

3f42b0a

33 remaining items

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P4low priobeginnerIssues suitable for new developersdocumentationDocumentation changes that do not affect code behaviourgood first issueIssues suitable for first time contributors to LNDhelp wanted

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    lnd updatechanpolicy has confusing --help · Issue #1523 · lightningnetwork/lnd