Skip to content

Commit

Permalink
Errors
Browse files Browse the repository at this point in the history
  • Loading branch information
ShahanaFarooqui committed Jan 3, 2024
1 parent 0bbf9f3 commit 3c4b5bb
Show file tree
Hide file tree
Showing 115 changed files with 545 additions and 1,013 deletions.
8 changes: 5 additions & 3 deletions doc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -130,14 +130,16 @@ MANPAGES := doc/lightning-cli.1 \
doc/lightning-getlog.7 \
doc/reckless.7

# MANPAGES := doc/lightning-bkpr-inspect.7

ifeq ($(HAVE_SQLITE3),1)
MANPAGES += doc/lightning-listsqlschemas.7 \
doc/lightning-sql.7
endif

doc-all: $(MANPAGES) doc/index.rst

SCHEMAS := $(wildcard doc/schemas/*.new.json)
SCHEMAS := $(wildcard doc/schemas/lightning-*.json)
check-fmt-schemas: $(SCHEMAS:%=check-fmt-schema/%)
fmt-schemas: $(SCHEMAS:%=fmt-schema/%)

Expand All @@ -156,8 +158,8 @@ MARKDOWN_WITH_SCHEMA := $(shell grep -l GENERATE-FROM-SCHEMA $(MANPAGES:=.md))
LBRACKET=(
RBRACKET=)

$(MARKDOWN_WITH_SCHEMA): doc/lightning-%.7.md: doc/schemas/%.new.json tools/fromschema.py
@if $(call SHA256STAMP_CHANGED); then $(call VERBOSE, "fromschema $@", tools/fromschema.py --markdownfile=$@ doc/schemas/$*.new.json > $@.tmp && grep -v SHA256STAMP: $@.tmp > $@ && rm -f $@.tmp && $(call SHA256STAMP,[comment]: # $(LBRACKET),$(RBRACKET))); else touch $@; fi
$(MARKDOWN_WITH_SCHEMA): doc/lightning-%.7.md: doc/schemas/lightning-%.json tools/fromschema.py
@if $(call SHA256STAMP_CHANGED); then $(call VERBOSE, "fromschema $@", tools/fromschema.py --markdownfile=$@ doc/schemas/lightning-$*.json > $@.tmp && grep -v SHA256STAMP: $@.tmp > $@ && rm -f $@.tmp && $(call SHA256STAMP,[comment]: # $(LBRACKET),$(RBRACKET))); else touch $@; fi

# If we need to build lowdown, make tools/md2man.sh depend on it.
# That way it's not used in SHA256STAMP (which only uses direct
Expand Down
26 changes: 7 additions & 19 deletions doc/lightning-autoclean-once.7.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,42 +14,30 @@ single sweep to delete old entries. This is a manual alternative (or
addition) to the various `autoclean-...-age` parameters which
cause autoclean to run once per hour: see lightningd-config(5).

The *subsystem*s currently supported are:

* `failedforwards`: routed payments which did not succeed (`failed` or `local_failed` in listforwards `status`).
* `succeededforwards`: routed payments which succeeded (`settled` in listforwards `status`).
* `failedpays`: payment attempts which did not succeed (`failed` in listpays `status`).
* `succededpays`: payment attempts which succeeded (`complete` in listpays `status`).
* `expiredinvoices`: invoices which were not paid (and cannot be) (`expired` in listinvoices `status`).
* `paidinvoices`: invoices which were paid (`paid` in listinvoices `status).

RETURN VALUE
------------

[comment]: # (GENERATE-FROM-SCHEMA-START)
On success, an object containing **autoclean** is returned. It is an object containing:

- **succeededforwards** (object, optional):
- **succeededforwards** (object, optional)
- **cleaned** (u64): total number of deletions done this run
- **uncleaned** (u64): the total number of entries *not* deleted this run
- **failedforwards** (object, optional):
- **failedforwards** (object, optional)
- **cleaned** (u64): total number of deletions done this run
- **uncleaned** (u64): the total number of entries *not* deleted this run
- **succeededpays** (object, optional):
- **succeededpays** (object, optional)
- **cleaned** (u64): total number of deletions done this run
- **uncleaned** (u64): the total number of entries *not* deleted this run
- **failedpays** (object, optional):
- **failedpays** (object, optional)
- **cleaned** (u64): total number of deletions done this run
- **uncleaned** (u64): the total number of entries *not* deleted this run
- **paidinvoices** (object, optional):
- **paidinvoices** (object, optional)
- **cleaned** (u64): total number of deletions done this run
- **uncleaned** (u64): the total number of entries *not* deleted this run
- **expiredinvoices** (object, optional):
- **expiredinvoices** (object, optional)
- **cleaned** (u64): total number of deletions done this run
- **uncleaned** (u64): the total number of entries *not* deleted this run

[comment]: # (GENERATE-FROM-SCHEMA-END)

AUTHOR
------

Expand All @@ -65,4 +53,4 @@ RESOURCES

Main web site: <https://github.com/ElementsProject/lightning>

[comment]: # ( SHA256STAMP:1f2819ff0d1a246efbe6dbd027083cb9c6dc0eedb4c7e44ead5d399c5fda07d4)
[comment]: # ( SHA256STAMP:f5582a2b845e7255253e518346201b3a2e86aae44f8e56d482e3f3802ab0c20a)
39 changes: 13 additions & 26 deletions doc/lightning-autoclean-status.7.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,68 +12,56 @@ DESCRIPTION
The **autoclean-status** RPC command tells you about the status of
the autclean plugin, optionally for only one subsystem.

The subsystems currently supported are:

* `failedforwards`: routed payments which did not succeed (`failed` or `local_failed` in listforwards `status`).
* `succeededforwards`: routed payments which succeeded (`settled` in listforwards `status`).
* `failedpays`: payment attempts which did not succeed (`failed` in listpays `status`).
* `succededpays`: payment attempts which succeeded (`complete` in listpays `status`).
* `expiredinvoices`: invoices which were not paid (and cannot be) (`expired` in listinvoices `status`).
* `paidinvoices`: invoices which were paid (`paid` in listinvoices `status).

RETURN VALUE
------------

Note that the ages parameters are set by various `autoclean-...-age`
parameters in your configuration: see lightningd-config(5).

[comment]: # (GENERATE-FROM-SCHEMA-START)
On success, an object containing **autoclean** is returned. It is an object containing:

- **succeededforwards** (object, optional):
- **succeededforwards** (object, optional)
- **enabled** (boolean): whether autocleaning is enabled for successful listforwards
- **cleaned** (u64): total number of deletions done (ever)

If **enabled** is *true*:

- **age** (u64): age (in seconds) to delete successful listforwards
- **failedforwards** (object, optional):

- **failedforwards** (object, optional)
- **enabled** (boolean): whether autocleaning is enabled for failed listforwards
- **cleaned** (u64): total number of deletions done (ever)

If **enabled** is *true*:

- **age** (u64): age (in seconds) to delete failed listforwards
- **succeededpays** (object, optional):

- **succeededpays** (object, optional)
- **enabled** (boolean): whether autocleaning is enabled for successful listpays/listsendpays
- **cleaned** (u64): total number of deletions done (ever)

If **enabled** is *true*:

- **age** (u64): age (in seconds) to delete successful listpays/listsendpays
- **failedpays** (object, optional):

- **failedpays** (object, optional)
- **enabled** (boolean): whether autocleaning is enabled for failed listpays/listsendpays
- **cleaned** (u64): total number of deletions done (ever)

If **enabled** is *true*:

- **age** (u64): age (in seconds) to delete failed listpays/listsendpays
- **paidinvoices** (object, optional):

- **paidinvoices** (object, optional)
- **enabled** (boolean): whether autocleaning is enabled for paid listinvoices
- **cleaned** (u64): total number of deletions done (ever)

If **enabled** is *true*:

- **age** (u64): age (in seconds) to paid listinvoices
- **expiredinvoices** (object, optional):

- **expiredinvoices** (object, optional)
- **enabled** (boolean): whether autocleaning is enabled for expired (unpaid) listinvoices
- **cleaned** (u64): total number of deletions done (ever)

If **enabled** is *true*:

- **age** (u64): age (in seconds) to expired listinvoices

[comment]: # (GENERATE-FROM-SCHEMA-END)

AUTHOR
------
Expand All @@ -83,12 +71,11 @@ Rusty Russell <<[email protected]>> is mainly responsible.
SEE ALSO
--------

lightningd-config(5), lightning-listinvoices(7),
lightning-listpays(7), lightning-listforwards(7).
lightningd-config(5), lightning-listinvoices(7),lightning-listpays(7), lightning-listforwards(7)

RESOURCES
---------

Main web site: <https://github.com/ElementsProject/lightning>

[comment]: # ( SHA256STAMP:0d997b9f41940245f25d5eb8ce9b9678c305bbdd3941cd17a1b2ba4c7d42310b)
[comment]: # ( SHA256STAMP:dbb5c220be93580a35a686e5a32d58fa0c452185f32a9ea7c298de8bfd1cb12b)
2 changes: 2 additions & 0 deletions doc/lightning-datastore.7.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ On success, an object is returned, containing:

[comment]: # (GENERATE-FROM-SCHEMA-END)

ERRORS
------

The following error codes may occur:

Expand Down
3 changes: 3 additions & 0 deletions doc/lightning-fetchinvoice.7.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ On success, an object is returned, containing:

[comment]: # (GENERATE-FROM-SCHEMA-END)

ERRORS
------

The following error codes may occur:

- -1: Catchall nonspecific error.
Expand Down
4 changes: 2 additions & 2 deletions doc/lightning-fundchannel.7.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ On success, an object is returned, containing:
- **close_to** (hex, optional): The raw scriptPubkey which mutual close will go to; only present if *close_to* parameter was specified and peer supports `option_upfront_shutdown_script`
- **mindepth** (u32, optional): Number of confirmations before we consider the channel active.

ERROR
------
ERRORS
-------

The following error codes may occur:

Expand Down
32 changes: 0 additions & 32 deletions doc/lightning-fundpsbt.7.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,38 +12,6 @@ DESCRIPTION
`fundpsbt` is a low-level RPC command which creates a PSBT using unreserved
inputs in the wallet, optionally reserving them as well.

*satoshi* is the minimum satoshi value of the output(s) needed (or the
string "all" meaning use all unreserved inputs). If a value, it can
be a whole number, a whole number ending in *sat*, a whole number
ending in *000msat*, or a number with 1 to 8 decimal places ending in
*btc*.

*feerate* is an optional feerate: see NOTES in lightning-feerates(7)
for possible values. The default is *normal*.

*startweight* is the weight of the transaction before *fundpsbt* has
added any inputs.

*minconf* specifies the minimum number of confirmations that used
outputs should have. Default is 1.

If *reserve* if not zero, then *reserveinputs* is called (successfully, with
*exclusive* true) on the returned PSBT for this number of blocks (default
72 blocks if unspecified).

*locktime* is an optional locktime: if not set, it is set to a recent
block height.

*min\_witness\_weight* is an optional minimum weight to use for a UTXO's
witness. If the actual witness weight is greater than the provided minimum,
the actual witness weight will be used.

*excess\_as\_change* is an optional boolean to flag to add a change output
for the excess sats.

*nonwrapped* is an optional boolean to signal to filter out any p2sh-wrapped
inputs from funding this PSBT.

EXAMPLE USAGE
-------------

Expand Down
56 changes: 0 additions & 56 deletions doc/lightning-invoice.7.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,62 +16,6 @@ lightning daemon can use to pay this invoice. This token includes a
*route hint* description of an incoming channel with capacity to pay the
invoice, if any exists.

The *amount\_msat* parameter can be the string "any", which creates an
invoice that can be paid with any amount. Otherwise it is a positive value in
millisatoshi precision; it can be a whole number, or a whole number
ending in *msat* or *sat*, or a number with three decimal places ending
in *sat*, or a number with 1 to 11 decimal places ending in *btc*.

The *label* must be a unique string or number (which is treated as a
string, so "01" is different from "1"); it is never revealed to other
nodes on the lightning network, but it can be used to query the status
of this invoice.

The *description* is a short description of purpose of payment, e.g. *1
cup of coffee*. This value is encoded into the BOLT11 invoice and is
viewable by any node you send this invoice to (unless *deschashonly* is
true as described below). It must be UTF-8, and cannot use *\\u* JSON
escape codes.

The *expiry* is optionally the time the invoice is valid for, in seconds.
If no value is provided the default of 604800 (1 week) is used.

The *fallbacks* array is one or more fallback addresses to include in
the invoice (in order from most-preferred to least): note that these
arrays are not currently tracked to fulfill the invoice.

The *preimage* is a 64-digit hex string to be used as payment preimage
for the created invoice. By default, if unspecified, lightningd will
generate a secure pseudorandom preimage seeded from an appropriate
entropy source on your system. **IMPORTANT**: if you specify the
*preimage*, you are responsible, to ensure appropriate care for
generating using a secure pseudorandom generator seeded with sufficient
entropy, and keeping the preimage secret. This parameter is an advanced
feature intended for use with cutting-edge cryptographic protocols and
should not be used unless explicitly needed.

If specified, *exposeprivatechannels* overrides the default route hint
logic, which will use unpublished channels only if there are no
published channels. If *true* unpublished channels are always considered
as a route hint candidate; if *false*, never. If it is a short channel id
(e.g. *1x1x3*) or array of short channel ids (or a remote alias), only those specific channels
will be considered candidates, even if they are public or dead-ends.

The route hint is selected from the set of incoming channels of which:
peer's balance minus their reserves is at least *amount\_msat*, state is
normal, the peer is connected and not a dead end (i.e. has at least one
other public channel). The selection uses some randomness to prevent
probing, but favors channels that become more balanced after the
payment.

If specified, *cltv* sets the *min\_final\_cltv\_expiry* for the invoice.
Otherwise, it's set to the parameter **cltv-final**.

If *deschashonly* is true (default false), then the bolt11 returned
contains a hash of the *description*, rather than the *description*
itself: this allows much longer descriptions, but they must be
communicated via some other mechanism.

RETURN VALUE
------------

Expand Down
27 changes: 0 additions & 27 deletions doc/lightning-invoicerequest.7.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,33 +17,6 @@ invoice, and payment of it. The reader of the resulting
`invoice_request` can use lightning-sendinvoice(7) to collect their
payment.

The *amount* parameter can be a positive value in millisatoshi
precision; it can be a whole number, or a whole number ending in
*msat* or *sat*, or a number with three decimal places ending in
*sat*, or a number with 1 to 11 decimal places ending in *btc*.

The *description* is a short description of purpose of the payment,
e.g. *ATM withdrawl*. This value is encoded into the resulting
`invoice_request` and is viewable by anyone you expose it to. It must
be UTF-8, and cannot use *\\u* JSON escape codes.

The *issuer* is another (optional) field exposed in the
`invoice_request`, and reflects who is issuing it (i.e. you) if
appropriate.

The *label* field is an internal-use name for the offer, which can
be any UTF-8 string.

The *absolute\_expiry* is optionally the time the offer is valid
until, in seconds since the first day of 1970 UTC. If not set, the
`invoice_request` remains valid (though it can be deactivated by the
issuer of course). This is encoded in the `invoice_request`.

*single\_use* (default true) indicates that the `invoice_request` is
only valid once; we may attempt multiple payments, but as soon as one
is successful no more invoices are accepted (i.e. only one person can
take the money).

RETURN VALUE
------------

Expand Down
19 changes: 3 additions & 16 deletions doc/lightning-keysend.7.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,22 +22,6 @@ generated on the destination, and the only way sender could have it is by
sending a payment. Please ensure that this matches your use-case when using
`keysend`.

`destination` is the 33 byte, hex-encoded, node ID of the node that the payment should go to.
`amount\_msat` is in millisatoshi precision; it can be a whole number, or a whole number with suffix `msat` or `sat`, or a three decimal point number with suffix `sat`, or an 1 to 11 decimal point number suffixed by `btc`.

The `label` field is used to attach a label to payments, and is returned in lightning-listpays(7) and lightning-listsendpays(7).
The `maxfeepercent` limits the money paid in fees as percentage of the total amount that is to be transferred, and defaults to *0.5*.
The `exemptfee` option can be used for tiny payments which would be dominated by the fee leveraged by forwarding nodes.
Setting `exemptfee` allows the `maxfeepercent` check to be skipped on fees that are smaller than *exemptfee* (default: 5000 millisatoshi).

The response will occur when the payment fails or succeeds.
Unlike lightning-pay(7), issuing the same `keysend` commands multiple times will result in multiple payments being sent.

Until *retry\_for* seconds passes (default: 60), the command will keep finding routes and retrying the payment.
However, a payment may be delayed for up to `maxdelay` blocks by another node; clients should be prepared for this worst case.

*extratlvs* is an optional dictionary of additional fields to insert into the final tlv. The format is 'fieldnumber': 'hexstring'.

When using *lightning-cli*, you may skip optional parameters by using
*null*. Alternatively, use **-k** option to provide parameters by name.

Expand Down Expand Up @@ -87,6 +71,9 @@ The following warnings may also be returned:

You can monitor the progress and retries of a payment using the lightning-paystatus(7) command.

ERRORS
------

The following error codes may occur:

- `-1`: Catchall nonspecific error.
Expand Down
9 changes: 0 additions & 9 deletions doc/lightning-listchannels.7.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,6 @@ The **listchannels** RPC command returns data on channels that are known
to the node. Because channels may be bidirectional, up to 2 objects will
be returned for each channel (one for each direction).

If *short\_channel\_id* is a short channel id, then only known channels with a
matching *short\_channel\_id* are returned. Otherwise, it must be null.

If *source* is a node id, then only channels leading from that node id
are returned.

If *destination* is a node id, then only channels leading to that node id
are returned.

Only one of *short\_channel\_id*, *source* or *destination* can be supplied.
If nothing is supplied, data on all lightning channels known to this
node, are returned. These can be local channels or public channels
Expand Down
Loading

0 comments on commit 3c4b5bb

Please sign in to comment.