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 29a23cf
Show file tree
Hide file tree
Showing 121 changed files with 562 additions and 1,027 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)
1 change: 0 additions & 1 deletion doc/lightning-bkpr-listaccountevents.7.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ Note that the type **onchain\_fees** that are emitted are of opposite credit/deb
produce the same list of events -- no previously emitted event will be
subsequently updated, rather we add a new event to the list.


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

Expand Down
4 changes: 2 additions & 2 deletions doc/lightning-cli.1.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,8 @@ raw JSON and are passed through. Other arguments are treated as strings.
Some commands have optional arguments. You may use *null* to skip
optional arguments to provide later arguments, although this is not encouraged.

EXAMPLES
--------
EXAMPLE USAGE
-------------

1. List commands:

Expand Down
4 changes: 2 additions & 2 deletions doc/lightning-commando-rune.7.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ to form valid JSON:
* `!`: only passes if the *name* does *not* exist. e.g. `pnamedestination!`.
Every other operator except `#` fails if *name* does not exist!

EXAMPLES
--------
EXAMPLE USAGE
-------------

This creates a fresh rune which can do anything:

Expand Down
8 changes: 6 additions & 2 deletions doc/lightning-createonion.7.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ The **createonion** RPC command allows the caller to create a custom onion
with custom payloads at each hop in the route. A custom onion can be used to
implement protocol extensions that are not supported by Core Lightning directly.


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

The *hops* parameter is a JSON list of dicts, each specifying a node and the
payload destined for that node. The following is an example of a 3 hop onion:

Expand Down Expand Up @@ -97,8 +101,8 @@ On success, an object is returned, containing:

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

EXAMPLE
-------
EXAMPLE RESPONSE
----------------

The following example is the result of calling *createonion* with the
above hops parameter:
Expand Down
4 changes: 2 additions & 2 deletions doc/lightning-createrune.7.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ to form valid JSON:
* `!`: only passes if the *name* does *not* exist. e.g. `pnamedestination!`.
Every other operator except `#` fails if *name* does not exist!

EXAMPLES
--------
EXAMPLE USAGE
-------------

This creates a fresh rune which can do anything:

Expand Down
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
Loading

0 comments on commit 29a23cf

Please sign in to comment.