Commit Graph

909 Commits

Author SHA1 Message Date
Vincenzo Palazzo d1c2c5c792 Fixed doc format and rebase
Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
2020-09-08 14:55:29 +09:30
Vincenzo Palazzo dde25b712c Fixed mistake inside the docs
Thanks @rustyrussell.

Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
2020-09-08 14:55:29 +09:30
Vincenzo Palazzo 0b0c5898ff Added doc file for the command getlog, help and listconfigs
Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
2020-09-08 14:55:29 +09:30
Vincenzo Palazzo 1a1b2f3d34 Start ping command and fix some convention in other new doc file
Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
2020-09-08 14:55:29 +09:30
Vincenzo Palazzo 77b20754da Added getinfo documentation and add some minor fixing inside the my others changes.
Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
2020-09-08 14:55:29 +09:30
Vincenzo Palazzo 19e4cf1126 Fixed grammar error to stop command documentation 2020-09-08 14:55:29 +09:30
Vincenzo Palazzo 5b1e181525 added documentation of command stop
Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
2020-09-08 14:55:29 +09:30
Vincenzo Palazzo d477a8d755 added sendpsbt documentation
Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
2020-09-08 14:55:29 +09:30
Vincenzo Palazzo d5a20b90b4 added documentation of commands listnodes, sendpsbt
Some grammar mistake was fixed as suggest and more command docs were added.

Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
2020-09-08 14:55:29 +09:30
Vincenzo Palazzo 4c72a6b71f added documentation of command listtransactions
Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
2020-09-08 14:55:29 +09:30
Rusty Russell 348f5c50da Makefile: fix up sqlgen and docgen rules.
Omitted in commit d8e8426b52

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2020-09-08 12:49:02 +09:30
Vincenzo Palazzo c9687ab6ce Added proxy information to config information for plugins
Changelog-Added: Plugins: Proxy information now provided in init.configuration."

Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
2020-09-08 11:47:48 +09:30
Vincenzo Palazzo 6e16ee0eaa Alignment doc with the actual implementation
Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
2020-09-07 11:07:34 +09:30
Christian Decker 037f7201be make: Do not delete deployable-lightning.pdf on maintainer-clean
It is not part of the default documentation generation, thus will show up in
the git diff every time a maintainer-clean is done. We could also add it to
the default documentation generation, however it requires some rather
heavy-weight latex dependencies, and the file hasn't changed in several years.
2020-09-07 11:03:29 +09:30
Rusty Russell 5bedcbeed7 doc: regenerate lightningd-config man page.
Merged as SHA256STAMP was going in.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2020-09-02 09:30:25 +09:30
Rusty Russell 9b8f08a8a0 lightningd: return min-capacity-sat to its intended purpose.
And document exactly what it does: insist that an HTLC can pass of
this value (module assumptions of feerate).

Note that we remove the "is_opener" test from the capacity calculation
for anchor fees: it doesn't matter which side it is, someone has to pay
for anchor fees to it deducts from capacity.

This change breaks the test, which we rewrite.

Changelog-Changed: config: `min-capacity-sat` is now stricter about checking usable capacity of channels.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2020-09-01 12:27:39 -05:00
Rusty Russell bb250358ae Makefile: force regeneration of manpages, wire source.
Now that SHA256STAMP protects us, we can avoid timestamps altogether
so we don't get missing builds.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2020-08-31 21:33:26 -05:00
Rusty Russell a00179d557 doc, wiregen: use SHA256 stamps instead of git versions.
This should be more robust in future: we SHA256 all of the deps.
For wiregen we prefix with EXPERIMENTAL_FEATURES, since it can effect them.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2020-08-31 21:33:26 -05:00
Rusty Russell dd8cd81e91 listpeers: add `features` array using BOLT9 names.
It's actually not possible to currently tell if you're using anchor_outputs
with a peer (since it depends on whether you both supported it at *channel open*).

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-added: JSON-RPC: `listpeers` shows `features` list for each channel.
2020-08-28 14:46:09 -05:00
Rusty Russell b9ac032329 doc: force refresh of all manpages.
The idea is that you regenerate the man pages in the same commit you
alter them: that's how we know whether to try regenerating them or not
(git doesn't store timestamps, so it can't really tell).

Travis will now check this, so force them all to sync to this commit.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2020-08-25 12:53:13 +09:30
Rusty Russell 67cde96397 Makefile: respect --quiet and V=1 in doc/Makefile.
And don't regen doc/index.rst unless there's good reason.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2020-08-25 12:53:13 +09:30
Rusty Russell ef3fbab551 invoice: don't allow zero-value invoices.
You can't pay them anyway, and at least one person used 0 instead of "any".

Closes: #3808
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Changed: JSON-RPC: `invoice` no longer accepts zero amounts (did you mean "any"?)
2020-08-25 12:22:45 +09:30
Rusty Russell aab3808668 utxopsbt: let caller specify locktime, add tests and python binding.
Changelog-Added: JSON-RPC: `utxopsbt` takes a new `locktime` parameter
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2020-08-18 11:38:25 -05:00
Rusty Russell 14baaaa8ba fundpsbt: let caller specify locktime.
Required for dual funding where the opener sets it.

Changelog-Added: JSON-RPC: `fundpsbt` takes a new `locktime` parameter
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2020-08-18 11:38:25 -05:00
Rusty Russell bf5e99403e utxopsbt: make default to only allow unreserved utxos.
This more closely mirrors fundpsbt (which will only select unreserved ones)
but you can turn it off if you want to e.g. rbf in future.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Added: JSON-RPC: New low-level command `utxopsbt` to create PSBT from existing utxos.
2020-08-18 12:52:41 +09:30
Rusty Russell b07327a687 utxopsbt: new command to create PSBT from given utxos.
It's *possible* to do this using various RPC calls, but it's
unfriendly:

1. Call getinfo to get the current block height.
2. Call listfunds to map the UTXOs.
3. Create the PSBT and hope you get all the fields correct.

Instead, this presents an interface just like `fundpsbt`, with identical
returns.

I think it's different enough to justify a new command (though it
shares much internally, of course).

In particular, it's now quite simple to create a command which uses
specified utxos, and then adds more to meet any shortfall.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2020-08-18 12:52:41 +09:30
Rusty Russell bcd632f2ae listfunds: add "redeemscript" field.
You'd need this if you ever wanted to make your own PSBT.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Added: `listfunds` now has a `redeemscript` field for p2sh-wrapped outputs.
2020-08-13 12:37:02 -05:00
Rusty Russell 6b39731c6a fundchannel: provide outnum
It's currently always 0, but it won't be once we replace txprepare.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Added: JSON-RPC: `fundchannel` has new `outnum` field indicating which output of the transaction funds the channel.
2020-08-13 12:37:02 -05:00
Dave Scotese d2bd1f0fa9 Update TOR.md
My testing shows that I received errors which turned out to be fatal ("/usr/libexec/c-lightning/lightning_connectd: libbacktrace: no debug info in ELF executable") when I had two `bind-addr=...` settings in my config file, which the instructions insinuated since c-lightning would already have been installed and runnable (therefore, already having a bind-addr).
2020-08-13 12:55:33 +02:00
Rusty Russell 7a7a849fc2 lightningd: allow plugin commands and options to mark themselves deprecated.
This lets us handle it the same way we handle builtin commands, and also
lets us warn if they use deprecated apis and allow-deprecated-apis=false.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Added: Plugins: can now mark their options and commands deprecated.
2020-08-11 08:43:18 +09:30
Rusty Russell 151bc47583 JSON-RPC: getmanifest passes allow-deprecated-apis flag.
This allows plugins to choose how to present things in getmanifest.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Added: plugins: `getmanifest` may now include "allow-deprecated-apis" boolean flag.
Changelog-Deprecated: plugins: `getmanifest` without any parameters; plugins should accept any parameters for future use.
2020-08-11 08:43:18 +09:30
Rusty Russell 0cbc6447b7 doc: refer to correct option name in STYLE.md.
It's --allow-deprecated-apis=false.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2020-08-11 08:43:18 +09:30
Vincenzo Palazzo 1521c29fcf listpays mod 1: add destination inside the response when bolt11 is null
Changelog-Added: JSON-RPC: `listpays` now lists the `destination` if it was provided (e.g., via the `pay` plugin or `keysend` plugin)
2020-08-09 16:03:03 +02:00
Vincent 700897f06e listpays: fixed bolt11 null with keysend and update doc command
listpays: make doc-all missed
Changelog-Added: JSON-RPC: `listpays` can be used to query payments using the `payment_hash`
Changelog-Added: JSON-RPC: `listpays` now includes the `payment_hash`
2020-08-09 16:03:03 +02:00
ZmnSCPxj jxPCSnmZ 4ca2e49812 lightningd/plugin.c: Make builtin plugins important.
Changelog-Changed: plugin: Builtin plugins are now marked as important, and if they crash, will cause C-lightning to stop as well.
2020-08-04 13:27:51 -05:00
ZmnSCPxj jxPCSnmZ a847487bbe lightningd/plugin.c: Add important plugins, which if they terminate, lightningd also terminates.
Changelog-Added: New option `--important-plugin` loads a plugin is so important that if it dies, `lightningd` will exit rather than continue.  You can still `--disable-plugin` it, however, which trumps `--important-plugin` and it will not be started at all.
2020-08-04 13:27:51 -05:00
ZmnSCPxj jxPCSnmZ e7d89cd7de lightningd/invoice.c: Improve programmatic error reporting for `delinvoice`.
Changelog-Changed: JSON-RPC: `delinvoice` will now report specific error codes: 905 for failing to find the invoice, 906 for the invoice status not matching the parameter.
2020-07-31 23:57:32 +00:00
Christian Decker 14d08b75cd doc: Document the `msatoshi` parameter for `sendonion` 2020-07-28 16:17:39 +09:30
ZmnSCPxj jxPCSnmZ 8e02998161 doc/PLUGINS.md: Correct misspelling of `getchaininfo`.
Changelog-None
2020-07-27 22:35:30 +02:00
Rusty Russell 71a2aefafd sendonion: add bolt11 arg.
And document the partid arg.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Added: JSON-RPC: `sendonion` has a new optional `bolt11` argument for when it's used to pay an invoice.
2020-07-27 13:11:14 +02:00
Rusty Russell 23af241c60 doc: document the payment_secret argument to sendpay.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2020-07-21 13:30:15 +02:00
Rusty Russell 73a5f5b313 fundpsbt: make parameters more usable.
fundpsbt forces the caller to manually add their weight * feerate
to the satoshis they ask for.  That means no named feerates.

Instead, create a startweight parameter and do the calc for them
internally, and return the feerate we used (and, while we're at it,
the estimated final weight).

This API change is best done now, as it would otherwise have to
be appended as a parameter.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2020-07-17 13:53:46 +02:00
Christian Decker de75d3ac0c mpp: Add CLI option to opt-out of multi-part payments
Several tests are not well-suited for mpp, so I added a CLI option to opt-out
of the MPP support at startup time.
2020-07-15 11:32:58 +02:00
Rusty Russell 406d0d09cf doc/STYLE.md: be clear we're talking about JSON output.
Suggested-by: @ZmnSCPxj
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2020-07-15 18:50:49 +09:30
Rusty Russell 1091be3d0d doc: document fundpsbt.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2020-07-15 18:49:02 +09:30
Rusty Russell be17a9392f reserveinputs: add exclusive flag.
This is the normal case: you only want to reserve inputs which
are not already reserved.  This saves you iterating through the
results and unreserving some if you weren't exclusive.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2020-07-15 18:49:02 +09:30
Rusty Russell 56ea215ba0 wallet: new JSON commands reserveinputs and unreserveinputs.
reserveinputs marks UTXOs reserved for 12 hours, so we won't select them
for spending: unreserveinputs marks them available again.

Exposes param_psbt() for wider use.

Disabled the test_sign_and_send_psbt since we're altering the API;
the final patch restores it.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2020-07-15 18:49:02 +09:30
Rusty Russell f53624517b doc: add JSON API advice.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2020-07-14 21:28:26 +02:00
Christian Decker 7978a13cae doc: Add a man-page for the new keysend command 2020-07-13 14:19:16 +02:00
Rusty Russell b1210eef52 doc: update since addition of feerate(7)
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2020-07-13 04:22:24 +00:00
ZmnSCPxj jxPCSnmZ b27f4e1f9a doc/lightning-feerates.7.md: Document `feerates` command.
Changelog-None
2020-07-13 08:45:30 +09:30
Rusty Russell 94de18ace7 listfunds: add scriptpubkey if it's known.
(Which it is, since 0.7.3).

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Added: JSON: `listfunds` now has a 'scriptpubkey' field.
2020-07-08 21:07:20 +02:00
ZmnSCPxj jxPCSnmZ deabab8934 lightningd/opening_control.c: `fundchannel_cancel` no longer requires a `channel_id` argument.
Fixes: #3785

Changelog-Changed: `fundchannel_cancel` no longer requires its undocumented `channel_id` argument after `fundchannel_complete`.
2020-07-02 01:10:59 +00:00
Christian Decker 9d36e49770 doc: Fix a documentation error in sendonion
Te `sendonion` docs where claiming that the `first_hop` needs to specify a
`channel_id` whereas it should really be the `node_id` of the peer we are
trying to contact.
2020-07-01 12:19:02 +02:00
Saibato e4cd2148ab Reflect in TOR.md that we need a Tor version >= 0.3.2.2-alpha to reach V3 onions
Changelog-None

Signed-off-by: Saibato <saibato.naga@pm.me>
2020-07-01 11:21:58 +02:00
ZmnSCPxj jxPCSnmZ 5d720536e2 Makefile: Install `tools/hsmtool` as `lightning-hsmtool`.
Changelog-Added: We now install `lightning-hsmtool` for your `hsm_secret` needs.

See: https://github.com/ElementsProject/lightning/issues/3717#issuecomment-644844594

It seems reasonable to add this to the standard install, and to document it properly as well, hopefully we can fill in the documentation better later on.
2020-07-01 09:24:03 +09:30
niftynei a68d79e390 add manpages for reserve/unreserve 2020-06-29 16:10:05 +02:00
Rusty Russell 42bf230bfc doc: regenerate and update.
My node tried to rebuild one of them because it was lagging (I noticed
because mrkd was not installed).

Turns out a few were lagging, and lightning-dev-sendcustommsg.7 was totally
empty!

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2020-06-28 01:14:08 +00:00
niftynei 431463b57a listfunds: also list reserved outputs
Currently 'listfunds' lies, a teensy eeinsy bit, in that it doesn't list
all of the funds in a wallet (it omits reserved wallet UTXOs). This
change makes the reserved outputs visible by listing them in the
'outputs' section along with a new field, 'reserved', which denotes the
UTXO's state

Changelog-Changed: JSON-RPC: `listfunds` 'outputs' now includes reserved outputs, designated as 'reserved' = true
2020-06-16 15:58:58 +02:00
Christian Decker 1933cc2523 docs: Fix typo in the `pay` command docs 2020-06-15 16:14:53 +02:00
niftynei 27e83f075f doc: remove bitcoin PPA from install instructions, use snap
the PPA is no longer maintained, the new hotness is the snapd install.
except that snapd does some weirdness with the binary names, calling it
bitcoin-core.daemon and bitcoin-core.cli. To get around this, you can
create a symbolic link to the snap binaries, which is what we outline
here.
2020-06-01 23:18:15 +02:00
Glen Cooper 8d98b99bde Update TOR.md
typo: referes, changed to refer
2020-05-26 12:21:40 +09:30
Antoine Poinsot f598caa60d config: don't ignore the --commit-fee option.
We did not take the value of --commit-fee into account : this removes
the unused option from lightningd and instead registers it in bcli,
where we set the actual feerate of commitment transactions. This also
corrects the documentation.

Changelog-Fixed: config: we now take the --commit-fee parameter into account.
Signed-off-by: Antoine Poinsot <darosior@protonmail.com>
2020-05-20 06:09:24 +09:30
Rusty Russell 3c625b367d doc: update cli documentation.
1. help now uses a boutique format, not -H.
2. document the -F option.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2020-05-15 15:25:44 +02:00
lisa neigut 8acbbca05d coins: use the chain's BIP173 name instead of a 'unit of account'
Updates the unit of account to be the chain_id, which is the BIP173 name
of the chain that the coins moved on.

Suggested-By: @rustyrussell
2020-05-12 15:46:58 +09:30
lisa neigut 44f747b29a coin moves: update PLUGINS.md with details about `coin_movement`s
Changelog-Added: Plugins: new notification type, `coin_movement`, which tracks all fund movements for a node
2020-05-12 15:46:58 +09:30
Christian Decker c7efe0bceb doc: Document the newly added commitment_revocation hook 2020-05-07 15:05:39 +09:30
Rusty Russell 24063ca972 lightningd: have plugin-disable be more persistent.
The previous implementation was a bit lazy: in particular, since we didn't
remember the disabled plugins, we would load them on rescan.

Changelog-Changed: config: the `plugin-disable` option works even if specified before the plugin is found.
2020-05-05 13:45:17 +09:30
rbndg e946b1889e Fixed PLUGIN.md comment for invoice creation 2020-05-04 19:18:05 +02:00
rbndg 241fa00e97 plugin:added invoice creation event
New invoice_creation event triggered when an new invoice is created

Changelog-Added: plugin: New invoice_creation plugin event
2020-05-04 19:18:05 +02:00
Sebastian Falbesoner 34ed2093ac doc: fix typo in STYLE.md (s/chanelog/changelog/)
Changelog-None
2020-05-04 10:47:56 +09:30
lisa neigut 0e20e3c5e7 df: rename 'funder' to 'opener'
Previously we've used the term 'funder' to refer to the peer
paying the fees for a transaction; v2 of openchannel will make
this no longer true. Instead we rename this to 'opener', or the
peer sending the 'open_channel' message, since this will be universally
true in a dual-funding world.
2020-05-04 10:22:26 +09:30
Aiden McClelland c485cf7dd1 docs: Add documentation for Alpine to INSTALL.md
Changelog-Added: docs: Install documentation now has information about building for Alpine linux
2020-04-30 19:27:39 -05:00
Christian Decker 9f298330b2 libplugin: It's featurebits, not features
The documentation was wrong, and I copied my mistake to `libplugin` where it
was then ignored instead of ORed into the node's featurebits. This fixes both.
2020-04-28 10:39:07 -05:00
Antoine Poinsot 6e5aa1af14 doc: bitcoin backend must return sat/kVB not btc/kVB on `estimatefees`
Reported-by: SimonVrouwe <s_github@protonmail.com>
Signed-off-by: Antoine Poinsot <darosior@protonmail.com>
2020-04-27 18:41:22 -05:00
Rusty Russell bf053dcf7c plugins: simplify htlc_accepted hook payload-setting API.
As discussed with Christian, prepending the length to the payload returned
is awkward, but it's the only way to set a legacy payload.  As this will
be soon deprecated, simplify the external API.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2020-04-16 18:03:35 +09:30
Rusty Russell 63441075b5 lightningd: allow htlc_accepted hook to replace onion payload.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-added: `htlc_accepted` hook can now offer a replacement onion `payload`.
2020-04-16 18:03:35 +09:30
Rusty Russell df31af5221 invoice: ignore dead-end heuristic on explicitly specified channels.
This makes testing easier, and makes sense: lightningd might not
*know* about other connected channels, depending on gossip, but if the
user specifies it we should obey it.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Changed: JSON: `invoice` `exposeprivatechannels` now includes explicitly named channels even if they seem like dead-ends.
2020-04-14 14:13:26 -05:00
Christian Decker 813356b88c docs: Correct the key names for estimatefees 2020-04-11 08:43:06 +09:30
Christian Decker f00e9d6ea8 doc: Give an example of the supported DSN formats
I was told that DSNs are not trivial to format, so this adds an example to
help setup the postgres wallet backend.
2020-04-11 08:43:06 +09:30
Christian Decker b68066e8e8 python: Consolidate requirements.txt files in a single place
We had them split according the separate use-cases:

 - testing
 - doc-gen
 - wire-gen

But that was causing new contributors to miss some dependencies when they
first got hacking. So this consolidates all of our own dependencies in a root
requirements.txt, with the notable exception of `pyln-client`, `pyln-testing`
and `pyln-proto` which are distributed as PyPI modules and therefore have
their own dependencies that need to be tracked in the module root.

Closes #3518
2020-04-09 15:14:06 +02:00
darosior 25405191fb doc: document the plugin interface to gather Bitcoin data
Changelog-Added: plugins: the interface to gather data from Bitcoin backend plugins is now final.
2020-04-09 14:21:15 +09:30
Vasil Dimov 662ac26d0c doc: fix typo: %s must be % (followup to 158d2212)
Changelog-None
2020-04-07 12:45:34 -05:00
Vasil Dimov 158d2212c2 closingd: configurable closing fee negotiation step
When negotiating the transaction fee for closing a channel [1], we used
to always pick the middle of the range between our proposal and the
peer's proposal.

Introduce a new option `fee_negotiation_step` to the close command, so
the peer who initiates the close can choose his back off step.

Partially resolves https://github.com/ElementsProject/lightning/issues/3270

[1] https://github.com/lightningnetwork/lightning-rfc/blob/master/02-peer-protocol.md#closing-negotiation-closing_signed

Changelog-Added: New optional parameter to the `close` command to control the closing transaction fee negotiation back off step
2020-04-07 13:52:48 +09:30
darosior ca36c21870 doc: fix FAQ formatting 2020-04-06 11:57:54 +02:00
darosior a5bd36c10a faq: add two new questions asked on IRC
Tim Ho asked about annouced IP addresses on IRC, and this was not
covered in the FAQ.
2020-04-03 20:04:54 -05:00
darosior b0c58f85ce doc: start an FAQ
This regroups questions (frequently) seen in Github issues, on IRC, and
also some I've been asked in face to face.

Changelog-Added: doc: An FAQ was added, accessible at https://lightning.readthedocs.io/FAQ.html

Christian wrote the block chain rescaning paragraph.
Lisa corrected my poor english grammar.
Co-Authored-by: Christian Decker <decker.christian@gmail.com>
Co-Authored-by: Lisa Neigut <niftynei@gmail.com>
2020-04-03 20:04:54 -05:00
Rusty Russell 28e3ffc66b plugins/fundchannel: make 'all' do the right thing for wumbo.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2020-04-03 13:13:21 +10:30
Rusty Russell 07a281faf8 lightningd: add large-channels / wumbo option.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-added: `large-channels` option to negotiate opening larger channels.
2020-04-03 13:13:21 +10:30
Rusty Russell 41ebaffba3 lightningd: return `features` in connect response.
This is useful in general, but in particular it allows fundchannel to avoid YA
query to figure out if it can wumbo.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Added: JSON: `connect` returns `features` of the connected peer on success.
2020-04-03 13:13:21 +10:30
Rusty Russell a7cc6d33c3 plugins: actually change global features when plugins tell us to.
This cleans up the boutique handling of features, and importantly, it
means that if a plugin says to offer a feature in init, we will now
*accept* that feature.

Changelog-Fixed: Plugins: setting an 'init' feature bit allows us to accept it from peers.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2020-03-31 13:36:02 +02:00
Rusty Russell a430abf899 connectd: permit multiple descriptors of the same type.
This restriction was removed from the spec as of
86c2ebcc5973a4133d3ce4d80ae1c203061a1646.

We also fix up some strange formatting in that part of the documentation.

Changelog-changed: We now announce multiple addresses of the same type, if given.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2020-03-31 13:36:02 +02:00
Michael Schmoock c6495c185c doc: adds receivable_msat to manpage 2020-03-27 12:33:23 +01:00
lisa neigut 42cce55b45 plugins: add 'flag' type for plugin options
Updates the plugin docs to include more detailed info about how options
work.

Changelog-Added: Plugins: 'flag'-type option now available.
2020-03-21 16:29:52 +10:30
Michael Schmoock f2478e9160 doc: point out 8char visual tabs in STYLE.md
Changelog-None
2020-03-19 10:45:35 +01:00
darosior 524d22e4cc doc: update listchannels manpage
After #3576 ..
2020-03-09 16:03:39 +01:00
Dave Scotese 53913c5119 Use of null
I added a hint how to specify source but not short channel id.
2020-03-07 15:48:22 +01:00
darosior 6f41d18a92 doc: add pyln-proto to PYTHONPATH for pytest in HACKING 2020-03-04 16:41:43 +01:00
ZmnSCPxj jxPCSnmZ d9b2482415 lightningd/hsm_control.c: Implement `getsharedsecret`.
ChangeLog-Added: New `getsharedsecret` command, which lets you compute a shared secret with this node knowing only a public point. This implements the BOLT standard of hashing the ECDH point, and is incompatible with ECIES.
2020-02-28 14:45:50 +10:30
Christian Decker 7f6f324590 python2: Remove python2 dependency from docs and dockerfiles 2020-02-27 09:18:24 +10:30
Vasil Dimov 89ceb273f5 wire: remove towire_double()
Before this patch we used to send `double`s over the wire by just
copying them. This is not portable because the internal represenation
of a `double` is implementation specific.

Instead of this, multiply any floating-point numbers that come from
the outside (e.g. JSONs) by 1 million and round them to integers when
handling them.

* Introduce a new param_millionths() that expects a floating-point
  number and returns it multipled by 1000000 as an integer.

* Replace param_double() and param_percent() with param_millionths()

* Previously the riskfactor would be allowed to be negative, which must
  have been unintentional. This patch changes that to require a
  non-negative number.

Changelog-None
2020-02-27 09:07:04 +10:30
Rusty Russell faac4b28ad plugins: support failure_message in invoice and htlc_accepted hooks.
As promised in the Changelog when we converted from failcodes to messages
internally.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2020-02-25 11:12:12 +10:30
darosior 230cebfb35 doc: clarify txprepare usage 2020-02-21 17:52:02 +01:00
ZmnSCPxj jxPCSnmZ 541472b77c doc/lightning-listpeers.7.md: Clarify `spendable_msat`.
Fixes: #3524

ChangeLog-none
2020-02-18 10:22:26 +10:30
Michael Schmoock ba36dfeba3 doc: all requirements.txt are needed for testing
the tests are not possible only by having tests/requirements.txt .
Running the whole testsuite also runs contrib/pyln-proto/tests/test_invoice.py
which needs requiremnets of pyln-proto and so on.

Also requirement coincurve requires libsecp256k1-dev headers.
As most developers need all requiremtents and we should tell them.
2020-02-18 10:10:17 +10:30
Rusty Russell 73f760342b doc: remove two more references to the '[Unreleased]' in CHANGELOG.md
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2020-02-17 19:07:09 +10:30
Rusty Russell 2c88ab53d4 doc: update MAKING-RELEASES.
1. GH_TOKEN is probably required to run the changelog script.
2. Note the footnotes need updating; we no longer have [Unreleased].

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2020-02-12 16:23:28 +10:30
ZmnSCPxj jxPCSnmZ 5c7f9b542a doc/lightning-listpeers.7.md: Expand and correct.
ChangeLog-Fixed: Corrected and expanded `lightning-listpeers.7` documentation.
2020-02-12 11:06:17 +10:30
Christian Decker c223932e40 doc: Update plugins.md to describe the chain-mode for hooks 2020-02-11 15:57:22 +10:30
Christian Decker bdbbfaeb40 doc: Reduce useless nesting in plugins.md
Triple nesting seems a bit excessive, I can't even read the titles in the
sidebar of http://lightning.readthedocs.org anymore :-)
2020-02-11 15:57:22 +10:30
Rusty Russell 30580731a6 Minor fixups on PR #3477
Feedback from @niftynei and me; nothing major, but avoids
another round-trip.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2020-02-11 13:53:31 +10:30
Christian Decker 5bd419d9fd doc: Document the featurebits functionality for plugins 2020-02-11 13:53:31 +10:30
ZmnSCPxj jxPCSnmZ e6c486f87c doc/lightning-listchannels.7.md: Fix factual errors.
Changelog-Fixed: Fixed factual errors in `lightning-listchannels.7` documentation.

`delay` is ***not*** the unilateral close delay for that channel-direction!
2020-02-10 15:57:55 +10:30
ZmnSCPxj jxPCSnmZ 6e34aa233a lightningd/: Hooks now support a consistent interface for 'no operation'.
Changelog-Changed: The hooks `db_write`, `invoice_payment`, and `rpc_command` now accept `{ "result": "continue" }` to mean "do default action", in addition to `true` (`db_write`), `{}` (`invoice_payment`), and `{"continue": true}` (`rpc_command`). The older "default" indicators are now deprecated and are now recognized only if `--deprecated-apis` is set.
2020-02-04 01:07:59 +00:00
Ken Sedgwick 5fd0ed79f4
lightningd: Added --subdaemon command to allow alternate subdaemons.
Changelog-Added: lightningd: Added --subdaemon command to allow alternate subdaemons.

[ Wow, that was mammoth; 44 comments over 12 commits. Feels almost unfair to squash it into one commit, so I wanted to note @ksedgwic's perseverence here! --RR ]
2020-02-04 10:44:13 +10:30
Vasil Dimov 149620ee0f build: fix and simplify doc/index.rst generation
* Fix usage of `echo "...\n..."` (without `-e`), generating a
broken output:
```
   lightningd-config <lightningd-config.5.md>
   lightningd\nlightning-autocleaninvoice.7.md <lightningd.8.md\nlightning-autocleaninvoice.7.md>
```

* Use `$(SORT)` instead of bare `sort` to avoid locale-dependent sort.

* Strip the trailing .[0-9].md without invoking sed.

* Sort all man pages as one block.

Changelog-None
2020-02-03 15:38:11 +00:00
ZmnSCPxj jxPCSnmZ 9346043f94 doc/PLUGINS.md: Mention `data_version` field of `db_write`, sketch how the backup plugin should work.
ChangeLog-Added: Fully documented `db_write` hooks in `doc/PLUGINS.md`.
2020-02-03 13:32:35 +01:00
ZmnSCPxj jxPCSnmZ fd76b8bfba doc/: Doc clarifications regarding connecting and funding.
ChangeLog-Fixed: Clarified about connection in documentation.  Also, `fundchannel`  already `connect`s if your node knows how to contact the desired peer for a few versions now, so clarify documentation about this as well.
2020-02-01 16:53:01 +01:00
Rusty Russell f3600d22a0 lightningd: disallow `msatoshi` arg to sendpay unless exact when non-MPP.
Using it with a different value to the amount sent causes a crash in 0.8.0,
which is effectively deprecating it, so let's disallow it now.

Changelog-Changed: If the optional `msatoshi` param to sendpay for non-MPP is set, it must be the exact amount sent to the final recipient.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2020-01-31 14:23:18 +01:00
Vasil Dimov 55173a56b7 Use dedicated type for error codes
Before this patch we used `int` for error codes. The problem with
`int` is that we try to pass it to/from wire and the size of `int` is
not defined by the standard. So a sender with 4-byte `int` would write
4 bytes to the wire and a receiver with 2-byte `int` (for example) would
read just 2 bytes from the wire.

To resolve this:

* Introduce an error code type with a known size:
  `typedef s32 errcode_t`.

* Change all error code macros to constants of type `errcode_t`.
  Constants also play better with gdb - it would visualize the name of
  the constant instead of the numeric value.

* Change all functions that take error codes to take the new type
  `errcode_t` instead of `int`.

* Introduce towire / fromwire functions to send / receive the newly added
  type `errcode_t` and use it instead of `towire_int()`.

In addition:

* Remove the now unneeded `towire_int()`.

* Replace a hardcoded error code `-2` with a new constant
  `INVOICE_EXPIRED_DURING_WAIT` (903).

Changelog-Changed: The waitinvoice command would now return error code 903 to designate that the invoice expired during wait, instead of the previous -2
2020-01-31 06:02:47 +00:00
Christian Decker 602b81fef2 doc: Add a section about the `custommsg` hook in the plugin doc 2020-01-28 23:50:52 +01:00
Christian Decker a3ddf9be9b docs: Add manpage for dev-sendcustommsg
It's a dev-* command for now, but better document it so people can use it
rather than having them guess how it's supposed to work.
2020-01-28 23:50:52 +01:00
ZmnSCPxj jxPCSnmZ 67590fc6be lightningd/invoice.c: Add `timeout` parameter to `waitanyinvoice`.
Fixes: #3192

Changelog-Added: `waitanyinvoice` now supports a `timeout` parameter, which when set will cause the command to fail when the timeout is reached; can set this to 0 to fail immediately if no new invoice has been paid yet.
2020-01-28 14:07:52 +01:00
ZmnSCPxj jxPCSnmZ 1e3fb8e750 doc/TOR.md: Mention about `statictor`.
Changelog-None
2020-01-28 13:46:33 +10:30
ZmnSCPxj jxPCSnmZ 7f4ed54b46 lightningd/jsonrpc.c: Set JSON-RPC socket permissions by command line.
Changelog-Added: Can now set the permissions on the JSON-RPC socket by `--rpc-file-mode`.
2020-01-27 21:11:57 +01:00
darosior f619124cb9 doc: update readthedocs index 2020-01-27 16:24:12 +00:00
darosior 6489e63991 doc/INSTALL: correct some typos
A double `git` and a `mode`.
2020-01-24 18:25:59 +01:00
ZmnSCPxj 54cc735201 lightningd/peer_control.c: Implement waitblockheight.
This is needed to fully implement handling of blockheight disagreements
between us and payee.
If payee believes the blockheight is higher than ours, then `pay`
should wait for our node to achieve that blockheight.

Changelog-Add: Implement `waitblockheight` to wait for a specific blockheight.
2020-01-21 22:23:21 +01:00
Vasil Dimov fc75d8a9e6 connectd: add own err codes instead of generic -1
Make it possible for connectd to send an error code to lightningd in
addition to the error message. Introduce two new error codes, replacing
the catch-all -1.

This change, together with
https://github.com/ElementsProject/lightning/pull/3395
will implement https://github.com/ElementsProject/lightning/issues/3366

Changelog-Changed: The `connect` command now returns its own error codes instead of a generic -1.
2020-01-21 16:59:18 +01:00
Vasil Dimov 3cf91b23b9 doc: unify man pages error sections
Change all man pages to follow the style of doc/lightning-pay.7.md for
the section on returning errors.

Changelog-None
2020-01-21 12:49:33 +08:00
Vasil Dimov 89466f0e55 doc: list the error codes of funding_* commands
Changelog-None
2020-01-21 12:49:33 +08:00
Vasil Dimov 3186215058 doc: update FreeBSD installation instructions
Now that c-lightning is in the FreeBSD ports system (\o/)
update the installation instructions, which basically boil down
to just `pkg install c-lightning`.

Changelog-None
2020-01-17 21:56:34 +01:00
fanquake 46f879d73f doc: openSSL is no longer required to build bitcoind
OpenSSL is no longer required after
https://github.com/bitcoin/bitcoin/pull/17265.

libsodium has never been required to build bitcoind on macOS.
2020-01-12 14:31:11 +01:00
Vasil Dimov 0ac91b4f99 doc: fix typo: s/these test/these tests/
Changelog-None
2020-01-06 12:57:59 +01:00
Vasil Dimov 50e7ecbe87 doc: add missing ":" in lightning-listpeers.7
Changelog-None
2020-01-06 12:57:59 +01:00
ZmnSCPxj ccece764f2 doc/lightningd.8.md: Fix formatting, remove old version.
Changelog-none
2020-01-05 03:00:47 +08:00
Rusty Russell c74fceb4c9 JSON RPC: invoice exposeprivatechannels can specify exact channels.
Changelog-Changed: JSON API: `invoice` `exposeprivatechannels` can specify exact channel candidates.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2020-01-04 08:07:22 +08:00
minidisk1147 f22595596a removed duplicate log-level subsystem 2020-01-02 16:40:24 +01:00
minidisk1147 1715b3d004 updated FreeBSD install instructions 2020-01-02 16:40:24 +01:00
Christian Decker b1e18e16a5 docs: Fix the `htlc_accepted` JSON payload in the docs
Had a spurious `}` in the example.
2020-01-02 16:05:52 +01:00
lisa neigut 689dd28ddd funding: enable push_msat
it's that time of year (merry xmas!)

enables the ability to push_msat on fundchannel

Changelog-Added: RPC: `fundchannel` and `fundchannel_start` can now accept an optional parameter, `push_msat`, which will gift that amount of satoshis to the peer at channel open.
2019-12-24 12:04:01 -06:00
Vasil Dimov b14b2b0490 doc: fix typos and minor rewording in doc/PLUGINS.md
Changelog-None
2019-12-17 23:21:51 +08:00
Vasil Dimov bf1f768a82 doc: fix the path to the sqlite database file
The sqlite database location has been changed in aab83e72.

Changelog-None
2019-12-16 15:31:42 +01:00
Vasil Dimov 1fe8cd8149 doc: fix typos in doc/TOR.md 2019-12-16 13:02:27 +01:00
Vasil Dimov 250fc79e93 doc: remove trailing whitespace from doc/TOR.md 2019-12-16 13:02:27 +01:00
Rusty Russell 839909d2cf Protocol: make var_onion, payment_secret and basic_mpp non-EXPERIMENTAL.
Thanks to @t-bast, who made this possible by interop testing with Eclair!

Changelog-Added: Protocol: can now send and receive TLV-style onion messages.
Changelog-Added: Protocol: can now send and receive BOLT11 payment_secrets.
Changelog-Added: Protocol: can now receive basic multi-part payments.
Changelog-Added: RPC: low-level commands sendpay and waitsendpay can now be used to manually send multi-part payments.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2019-12-12 22:16:03 +01:00
Vasil Dimov 38d88f1aff doc: fix commit-time formatting 2019-12-11 16:19:43 +01:00
darosior b4c18a10cf doc/lightningd-config: precise alias are 32 __bytes__ long.
And not 32 characters long, as a character (for example 🐨) can be 4
bytes long.

Reported-By: Vasil Dimov <@vasild>
2019-12-11 16:19:43 +01:00
darosior 2986854c88 doc/lightningd-config: correct misaligned RGB option paragraph 2019-12-11 16:19:43 +01:00
Rusty Russell f7ebbb2ec5 common: make sphinx code ignorant of payload format.
Now "raw_payload" is always the complete string (including realm or length
bytes at the front).

This has several effects:
1. We can receive an decrypt an onion which is grossly malformed.
2. We can still hand this to the htlc_accepted hook.
3. We then fail it unless the htlc_accepted accepts it manually.
4. The createonion API now takes the raw payload, and does not know
   anything about "style".

The only caveat is that the sphinx code needs to know the payload
length: we have a call for that, which simply tells it to copy the
entire onion (and treat us as the final node) if it's invalid.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2019-12-09 14:33:31 +01:00
Rusty Russell f8d8348c9f doc: add 'id' to rpc_command
It's required, so at least hint about its presence!

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2019-12-08 15:26:28 +01:00
Rusty Russell 4683d096dd doc: feerate is not obvious, refer to fundchannel documentation:
It has a whole *two paragraphs* on it:

*feerate* is an optional feerate used for the opening transaction and as
initial feerate for commitment and HTLC transactions. It can be one of
the strings *urgent* (aim for next block), *normal* (next 4 blocks or
so) or *slow* (next 100 blocks or so) to use lightningd’s internal
estimates: *normal* is the default.

Otherwise, *feerate* is a number, with an optional suffix: *perkw* means
the number is interpreted as satoshi-per-kilosipa (weight), and *perkb*
means it is interpreted bitcoind-style as satoshi-per-kilobyte. Omitting
the suffix is equivalent to *perkb*.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2019-12-04 08:35:50 -06:00
Saibato b18510a7e3 Reflect the changes in documentation
Signed-off-by: Saibato <saibato.naga@pm.me>
2019-12-03 23:35:18 +01:00
fiatjaf 99ff86f6fe update docs with `payment_preimage`.
Changelog-Added: JSON-RPC: `listinvoices` now displays the payment preimage if the invoice was paid.
2019-12-03 01:16:07 +00:00
Christian Decker 21b5b59c8c json-rpc: Rename onion payload type to style
Suggested-by: Rusty Russell <@rustyrussell>
2019-12-01 15:40:47 +01:00
Christian Decker 2080416a89 doc: Add manpages for `createonion` and `sendonion`
Changelog-Added: Added `createonion` and `sendonion` JSON-RPC methods allowing the implementation of custom protocol extensions that are not directly implemented in c-lightning itself.
2019-12-01 15:40:47 +01:00
Michael Schmoock 895e06122c doc: adds pyln deps to command for running blackbox tests
This one got missing when introducting `pyln` packages as test dependencies.
2019-11-29 21:23:23 +01:00
Rusty Russell ebac3d2a85 spec: update to experimental BOLTs with secret/total_amount.
Also pulls in a new onion error (mpp_timeout).  We change our
route_step_decode_end() to always return the total_msat and optional
secret.

We check total_amount (to prohibit mpp), but we do nothing with
secret for now other than hand it to the htlc_accepted hook.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2019-11-24 23:33:17 +00:00
Rusty Russell a56f2b25b0 common: parse --allow-deprecated-apis extremely early.
We're going to want this for changing the default network.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2019-11-23 22:42:34 +00:00
Rusty Russell aab83e729b lightningd: change config-dir from plugin / wallet / hsm POV into <network> subdir
Changelog-changed: .lightningd plugins and files moved into <network>/ subdir
Changelog-changed: WARNING: If you don't have a config file, you now may need to specify the network to lightning-cli
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2019-11-23 22:42:34 +00:00
Rusty Russell dc23c308e4 config: Read both top-level and network-subdir config files.
This lets you have a default, but also a network-specific config.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-changed: Options: `config` and <network>/`config` read by default.
2019-11-23 22:42:34 +00:00
Rusty Russell 8b1aa3ef8b lightningd: move basic parameter parsing into common/configdir
lightning-cli is going to need to know what network we're on, so
it will need to parse the config files.  Move the code which does
the initial bootstrap parsing into common, as well as the config
file parsing core.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2019-11-23 22:42:34 +00:00
Rusty Russell 34c89cb226 config: Add include directive support.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Added: Config: configuration files now support `include`.
2019-11-23 22:42:34 +00:00
lisa neigut de16d0f0b4 openchannel hook: add new `close_to` field
Rounds out the application of `upfront_shutdown_script`, allowing
an accepting node to specify a close_to address.

Prior to this, only the opening node could specify one.

Changelog-Added: Plugins: Allow the 'accepter' to specify an upfront_shutdown_script for a channel via a `close_to` field in the openchannel hook result
2019-11-22 00:41:15 +00:00
Rusty Russell 709c98f539 logging: remove spaces from subsystem names.
Spaces just make life a little harder for everyone.

(Plus, fix documentation: it's 'jsonrpc' not 'json' subsystem).

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2019-11-18 04:50:22 +00:00
Rusty Russell 0aad532db1 logging: add examples for logging.
As suggested by @cdecker, but also did a bit of minor reformatting.

I don't like the excessive indenting in our man pages though,
but that's a separate problem.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2019-11-18 04:50:22 +00:00
Rusty Russell 0607f998d1 options: allow --log-level <level>:<prefix> for finegrained log control.
This allows finegrained logging control of particular subdaemons or
subsystems.

To do this, we defer setting the logging levels for each log object
until after early argument parsing (since e.g. "bitcoind" log object
is created early).

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-changed: Options: log-level can now specify different levels for different subsystems.
2019-11-18 04:50:22 +00:00
Rusty Russell b0a72a67e8 doc/lightningd-config.5.txt: remove
Replaced by doc/lightningd-config.5.md.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2019-11-18 04:50:22 +00:00
Rusty Russell c83834ca82 lightningd: expose/accept "style" parameter in routes.
Default is legacy.  If we have future styles, new strings can be defined,
but for now it's "tlv" or "legacy".

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2019-11-14 10:15:33 +01:00
Rusty Russell 2a2259083a lightningd: handle tlv-style payloads.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-changed: JSON API: `htlc_accepted` hook has `type` (currently `legacy` or `tlv`) and other fields directly inside `onion`.
Changelog-deprecated: JSON API: `htlc_accepted` hook `per_hop_v0` object deprecated, as is `short_channel_id` for the final hop.
2019-11-14 10:15:33 +01:00
darosior 6427ccba50 Document the 'rpc_command' hook 2019-11-11 22:30:01 +01:00
darosior 5766231d98 pay: restore payment value randomization through shadow routing
When doing the random walk through the channel, we now add the fees
(both the base and the proportional one) for that channel in addition to
the cltv delta.

Changelog-Added: Payment amount fuzzing is restored, but through shadow routing.
2019-11-08 03:27:58 +00:00
Christian Decker 290b4d68b3 changelog: Add a tool to extract changelog entries from the commits
Since the `CHANGELOG.md` file is a major source for merge conflicts I decided
to build a tiny tool that generates the entries for the changelog
automatically from the commit messages.
2019-11-08 00:23:09 +00:00
lisa neigut 7374134dab doc: add reminder to close out Milestone to Making-Releases 2019-11-01 18:55:54 +01:00
lisa neigut 16fde5c79d releases: break up first git tag for verification purposes
I'm not sure what went wrong, but the first RC I cut had some trouble
with the tag being picked up with `git describe`, I think it was missing
a 'tag message'. I'm not sure what caused this.

This commit breaks up the first git tag procedure to have the releaser
verify that the tag command works as intended (and sensitizes them to
checking this for subsequent release cuts, if necessary)
2019-11-01 18:55:54 +01:00
lisa neigut c581fd9956 releases: update with niftynei's notes from release 0.7.3 2019-11-01 18:55:54 +01:00
arowser 67ce27aac7 remove repeat line in doc/requirements.txt 2019-10-29 12:18:45 -05:00
arowser cd894468e7 remove repeat install dependencies 2019-10-29 12:18:45 -05:00
Kristaps Kaupe e16ac08f6f Change order of paragraphs in manpage of fundchannel 2019-10-21 14:01:49 +02:00
lisa neigut 422b4502d3 funding: add RPC arg to specify a 'close_to' address
Takes advantage of upfront-shutdown-script to permit users to
specify the close-to address for a channel at open, by adding
a `close_to` field to `fundchannel_start`.

Note that this only is in effect if `fundchannel_start` returns
with `close_to` set -- otherwise, peer doesn't
support `option_upfront_shutdown_script`.
2019-10-15 19:10:05 +02:00
Rusty Russell ad48814746 doc: man pages for checkmessage and signmessage.
They're a little subtle, so let's spell out exactly what checkmessage
means.  In particular, we avoid discussing key derivation from a
signature, as it tends to get people (like me!) into trouble: we
describe it instead as iterating through every known node.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2019-10-14 18:58:44 -05:00
Rusty Russell bd55f6d940
common/features: only support a single feature bitset.
This is mainly an internal-only change, especially since we don't
offer any globalfeatures.

However, LND (as of next release) will offer global features, and also
expect option_static_remotekey to be a *global* feature.  So we send
our (merged) feature bitset as both global and local in init, and fold
those bitsets together when we get an init msg.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2019-10-11 02:52:04 +00:00
darosior a698395bf0 lightningd: '--encrypted-hsm', a new startup option
Add a new startup option which will, if set, prompt the user for a
password to derive a key from. This key will later be used to encrypt
and/or decrypt `hsm_secret`.

This was made a noarg option even if it would have been preferable to
let the user the choice of how to specify the password. Since we have
to chose, better to not let the password in the commands history.
2019-10-09 22:00:38 -05:00
trueptolemy e53d065230 doc: Update the doc about `destination` of `close` 2019-10-09 21:04:16 -05:00
trueptolemy e4cd5df06c doc: Use `amount` as the parameter name for `fundchannel` 2019-10-09 16:51:42 -05:00
trueptolemy 25583ffe37 doc: Use `amount` as the parameter name for `fundchannel` 2019-10-09 16:51:42 -05:00
trueptolemy c6a4bac8b6 Fix: Fix the doc of `txprepare`. Add the description of some parameters. 2019-10-09 16:51:42 -05:00
darosior 0d73777695 doc: update mrkd requirement 2019-10-05 03:25:12 +00:00
darosior 61c07bca45 doc: Document the changes to the 'plugin' command 2019-09-30 00:20:16 +00:00
darosior 2c43606895 doc: update mrkd version
The new tag includes @cdecker's modifications for better list handling
2019-09-29 14:06:40 +02:00
Saibato 32a1b782f3 Add lines in regard to enable-autotor-v2-mode flag to doc files
Signed-off-by: Saibato <saibato.naga@pm.me>
2019-09-28 00:31:02 +02:00
lambrosini 6999a4ce2d Remove the python-dev dependency which is useless in python3 2019-09-25 20:37:50 +02:00
lambrosini eb28268bd7 Install in the OS dependencies required to successfully install the python requirements 2019-09-25 20:37:50 +02:00
lambrosini 08573fbc4b Clone the repository before than installing requirements, which are specified in the repository 2019-09-25 20:37:50 +02:00
Christian Decker 5953a5051c cli: Add command line option to specify the wallet location
Will be demuxed into starting the selected DB backend in one of the next
commits. Defaults to the old database location.

Signed-off-by: Christian Decker <decker.christian@gmail.com>
2019-09-22 02:03:43 +00:00
fiatjaf 1d5bbc874a format JSON snippets with jq. 2019-09-21 19:41:43 +02:00
Rusty Russell fe66b53fb9 jsonrpc: add more fields to listfunds.
This avoids having to correlate with listpeers for the most pertinent
information.

This API predates plugins, otherwise we'd have listutxos and listpeers
and this would simply combine them appropriately.  Still, it exists so
there's little reason not to make it more friendly.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2019-09-19 01:03:09 +00:00
darosior 697b501132 doc: place lightningd manpages first in index.rst 2019-09-16 13:16:08 +02:00
Jacob Rapoport 6360ffb2ac fix macOS build & update docs 2019-09-16 05:08:42 +00:00
trueptolemy a795f5e600 doc: Update the document of `getroute`about excluding nodes 2019-09-16 12:22:06 +08:00
lisa neigut 5c70890efa rpc: add 'utxos' parameter to txprepare + withdraw
Allow a user to select the utxo set that will be added to a
transaction, via the `utxos` parameter. Optional.

Format for utxos should be of the form ["txid:vout","..."]
2019-09-11 23:56:27 +00:00
lisa neigut b1f05795a8 rpc: have fundchannel_start also return scriptpubkey
Easier to pass it back than dig it out of the address, since we
have it. Needed for extracting fundchannel
2019-09-11 23:56:27 +00:00
trueptolemy 264b3692fb doc: update the document of `fundchannel_cancel` 2019-09-11 17:04:14 -05:00
trueptolemy 3722d169ae doc: Add the description for 'sendpay_success' and 'sendpay_failure' notifications 2019-09-11 00:57:39 +00:00
darosior e52af0d1ea doc: Document the new dependency 2019-09-10 02:17:27 +00:00
darosior 0b0ad4c22d transition from status_trace() to status_debug 2019-09-10 02:02:51 +00:00
darosior d0fe0d658f doc: remove duplicate lines from index.rst 2019-09-08 15:59:04 +02:00
lisa neigut 6e991eaebb docs: add install line 2019-09-07 12:21:22 +02:00
trueptolemy d813dff3b4 doc: Update the document of `txprepare` 2019-09-05 16:05:36 -05:00
Michael Schmoock 76f27f47dc doc: HACKING - point out how to run the pylightning tests 2019-09-03 19:02:04 +02:00
darosior 0e2ec27576 doc/requirements.txt: update 'mrkd' dependency 2019-09-02 16:31:36 +02:00
Christian Decker c3254e6639 docs: Update manpages to be recognized correctly by mrkd
mrkd started enforcing the `name -- short description` style of top-level
headings somewhere, and was thus failing to build the man-pages. I swapped
the title and with the existing short description to make it work
again. `mrkd` will automatically infer the section from the filename so no
need to put it in the title as well.

In addition I removed the "last updated" lines at the bottom since they are
out of date at best, and misleading at the worst. If we want to keep them, I'd
suggest generating them from the commit that last touched them.
2019-09-02 16:31:36 +02:00
darosior 8f8e955421 Update installation instructions and Dockerfile
Get rid of the 'asciidoc' dependency, make developers also install 'doc/requirements.txt'
2019-08-30 00:34:11 +00:00
Christian Decker b77270fa46 docs: Add the title of the manpage to TOC and sort alphabetically
Fixes #2987
2019-08-29 14:56:24 +02:00
Rusty Russell dbc1ebe06a Makefile: fix race when checking manpages.
By not depending on plugins, we can call lightningd before plugins are
built, and not get all options:

    diff of command names vs manpage names:
    --- /dev/fd/63  2019-08-22 05:06:55.265659216 +0000
    +++ /dev/fd/62  2019-08-22 05:06:55.265659216 +0000
    @@ -3,6 +3,8 @@
     allow-deprecated-apis=
     always-use-proxy=
     announce-addr=
    +autocleaninvoice-cycle=
    +autocleaninvoice-expired-by=
     autolisten=
     bind-addr=
     bitcoin-cli=

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2019-08-28 04:04:28 +00:00
Damian Mee e4d0ef6e11 doc: fix wording for fundchannel_complete 2019-08-23 08:23:42 -07:00
darosior 529630a453 doc/Makefile: update readthedocs pages on doc-all
Stolen from @rustyrussell's #2928
2019-08-22 01:35:01 +00:00
darosior 77f34fad2b doc/Makefile: adapt 'check-manpages' to markdown 2019-08-22 01:35:01 +00:00
darosior 49be9b5545 doc/manpages: Add manpages to readthedocs 2019-08-22 01:35:01 +00:00
darosior d37a2d7c3e doc/manpages: regenerate manpages using markdown templates 2019-08-22 01:35:01 +00:00
darosior 76a4c5f287 doc/Makefile: Use mrkd to generate manpages 2019-08-22 01:35:01 +00:00
darosior 80927039e0 doc/manpages: replace asciidoc by markdown 2019-08-22 01:35:01 +00:00
darosior 3f29216f7b doc/Makefile: Add lightning-plugin manpage 2019-08-22 01:35:01 +00:00
Rusty Russell 04a57ae4af doc/MAKING-RELEASES.md: update.
1. These days we delete the [Unreleased] tag during rcs.
2. Make sure we test the release build process during rc1, since I
   screwed that up last release.
3. Add a section on rc2, etc.
4. Do final release via a github PR, since I screwed that up on the
   prior release.
5. Update `tools/build-release.sh` and instructions to show that we now
   make a reproducible build for Ubuntu 18.04 x86-64.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2019-08-19 03:43:13 +00:00
Rusty Russell 1bd1829a8e doc: update lightning-listforwards(7)
It didn't have the new payment_hash field in it, and needed updating to
list optional fields.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2019-08-15 03:12:56 +00:00
Rusty Russell ca28c30eff funding: don't allow funding new channels until we're synced.
This is probably worth preventing.

1. Our depth estimate would be inaccurate possibly leading to us
   timing out too early.
2. If we're not up-to-date our onchain funds are unknown.
3. We wouldn't be able to send or receive HTLCs until we're synced anyway.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2019-08-10 22:09:09 +02:00
Christian Decker cc5f2dcae3 readme: First pass at homogenizing the readme a bit
We haven't touched the readme for quite some time, just randomly added to it,
and it's starting to show. This is my attempt at cleaning it up a bit (more to
come):

 - No longer discourage users from running on mainnet, we're way beyond that
   point.
 - No longer instruct users to build from source, when we have real binary
   releases, on the PPA, the releases page and the docker images.
 - Cut down on the docker specific instructions, they are taking a lot of room
   when only a minority will likely run them that way
 - Generally make the README more of a dispatch for more in-depth
   documentation rather than trying to address everything right on the
   front-page.
 - Add a bit of context about running on top of a pruned node

Signed-off-by: Christian Decker <decker.christian@gmail.com>


Header from folded patch 'fixup!_readme__first_pass_at_homogenizing_the_readme_a_bit.patch':

fixup! readme: First pass at homogenizing the readme a bit
2019-08-09 10:29:37 +00:00
Rusty Russell 83e654a106 close: change to a unilateraltimeout argument.
`close` takes two optional arguments: `force` and `timeout`.
`timeout` doesn't timeout the close (there's no way to do that), just
the JSON call.  `force` (default `false`) if set, means we unilaterally
close at the timeout, instead of just failing.

Timing out JSON calls is generally deprecated: that's the job of the
client.  And the semantics of this are confusing, even to me!  A
better API is a timeout which, if non-zero, is the time at which we
give up and unilaterally close.

The transition code is awkward, but we'll manage for the three
releases until we can remove it.

The new defaults are to unilaterally close after 48 hours.

Fixes: #2791
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2019-08-09 05:47:16 +00:00
Rene Pickhardt 1dd890825a doc: Document max-concurrent-htlcs option. 2019-08-09 05:45:06 +00:00
darosior f98ae2d1d3 Correct version regex in Makefile, add git as dependency 2019-08-09 02:49:45 +00:00
ZmnSCPxj 821832032d doc/lightningd.8.txt: Initial manpage for lightningd itself.
Closes: #1360
2019-08-09 02:36:59 +00:00
Rusty Russell bcff30bb3f fixup! doc: fix up documentation about when we move into lightning-dir. 2019-08-08 18:17:12 +08:00
Rusty Russell 202ab91234 doc: fix up documentation about when we move into lightning-dir.
And make sure that plugins know that they should not touch things
until their init call.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2019-08-08 18:17:12 +08:00
Rusty Russell fd63b8bf53 lightningd: chdir as soon as we know lightning dir.
This is easy since we did the option parsing cleanup, but it has the
effect that plugins are launched from the lightning-dir.  Now
we have dynamic plugins, this means startup and post-startup plugins
experience the same environment.

This is absolutely a desirable thing: they can just drop files in
their cwd rather than having to move (including, I might note, core
files!).

We also highlight the change in various places (and a drive-up update
of PLUGINS.md which says you have to use --plugin).

The next patch adds a backwards compatibility wedge for old users of
relative plugin paths.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2019-08-03 09:10:11 +00:00
trueptolemy 7b59431a6c doc: Add the description for 'forward_event' notification 2019-08-01 18:49:25 +08:00
Simon Vrouwe 1ae8b73f0e doc: invoice manpage: add some details about route hint selection
Also add more detail to the warnings returned by the invoice command.
2019-07-31 23:25:37 +00:00
Rusty Russell 488ef67b9b doc: fix typo in default port number.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2019-07-30 05:05:45 +00:00
Rusty Russell 310d806dd3 plugins: document and extend the ~/.lightning/plugins/ dir.
Load any plugins directly as well as subdirs.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2019-07-29 14:32:07 +02:00
Rusty Russell 9e5b9a31c9 FreeBSD: fix build.
This makes it build for me on FreeBSD 11:
1. $(MAKE) has to passed through into update-mocks.
2. FreeBSD sed doesn't turn \n into a newline on RHS.
3. Bash and mako dependencies were missing from INSTALL.md

Fixes: #2850
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2019-07-29 14:24:29 +02:00
darosior dda154612c doc: add the new init and getmanifest fields 2019-07-28 07:24:04 +00:00
darosior e61e0cc28b Add a manpage for the 'plugin' command 2019-07-28 07:24:04 +00:00
Rusty Russell 6da420a65b lightning-cli: change default printing in response to "format-hint": "simple".
And set it for 'help <command>'.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2019-07-28 06:09:56 +00:00
darosior 2683170da8 Test and document 'channel_opened' notification 2019-07-27 12:18:25 +02:00
Kristaps Kaupe d02496b89b Return output idx for a funding tx in a channel information in listfunds 2019-07-26 06:25:13 +08:00
darosior 5dee59e969 Plugins: update the doc and add a changelog bragline about 'invoice_payment' notification 2019-07-25 11:19:47 +08:00
sskender 2235d3b9d7 Update INSTALL.md
Missing dependency for Ubuntu 18.04
2019-07-25 07:54:38 +08:00
lisa neigut 068496298c bolt-gen: rm unused bolt-generator; rename new bolt generator
delete now unused wire-generator and replace it with the newer
version.
2019-07-24 06:31:46 +00:00
Karl-Johan Alm 918e130448 add signet support 2019-07-22 16:38:32 -05:00
ZmnSCPxj bb301040e4 lightningd/options.c: Add option for setting how long to keep trying bitcoin-cli command. 2019-07-18 18:59:11 +02:00
Kristaps Kaupe 868bde5e00 Add missing return fields to the manpage of listforwards 2019-07-18 04:50:00 +00:00
darosior 7984a55339 doc: Add hooks to the 'getmanifest' example in PLUGINS.md 2019-07-17 20:16:08 -05:00
lisa neigut 5c07afac7d bolt: update to BOLT spec changes (extract format + type specifications)
updates the bolt version to 6639cef095a2ecc7b8f0c48c6e7f2f906fbfbc58.

this requires us to use the new bolt parser at generate-bolt.py
and updates to all of the type specifications (ie. from u8 -> byte)
2019-07-16 06:10:58 +00:00
Juraj Bednar ab52638f93 Fix typos and options
--proxy= instead of --proxy:
--always-use-proxy needs value (true)
2019-07-15 01:00:57 +00:00
lisa neigut 7046d0220c makefiles: move all unit tests under `make check-units`
Isolate unit tests under their own make directive.
2019-06-30 16:41:30 +09:30
darosior da676baac4 plugins doc: remove the 'only string options' warning
int and bool are now also accepted ! :)
2019-06-17 10:25:30 +00:00
darosior 8edf55b34a doc: Correct preimage field name in pay return value 2019-06-15 10:49:29 +02:00
lisa neigut c0475d0d9d doc: add manpages for fundchannel_[start,complete,cancel]
Manpages for the manpage-god!!
2019-06-12 02:22:43 +00:00
darosior 1b29b063b2 fundchannel: Update the manpage and Pylightning's method
Add the new 'utxo' parameter to both
2019-06-11 23:24:07 +00:00
Rusty Russell b48c644e7a listchannels: add `htlc_minimum_msat` and `htlc_maximum_msat` fields.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2019-06-11 23:19:11 +00:00
Rusty Russell 0e7b26d7c7 devtools/credit: script to highlight contributions for this commit.
And update MAKING-RELEASES.md to refer to it

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2019-06-07 13:37:58 +02:00
trueptolemy 1ca0eef744 doc: Add the description for 'warning' notification and add a CHANGELOG entry 2019-06-07 01:23:51 +00:00
Rusty Russell 985048edf8 wallet: new commands 'txprepare', 'txsend' and 'txdiscard'.
This allows you to prepare a tx, then release or discard it later.

Shares almost all the code with json_withdraw (which is now technically
superfluous).

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2019-06-06 04:47:44 +00:00
Christian Decker a57fdf2033 plugin: Added CHANGELOG entry and docs for the htlc_accepted hook
Signed-off-by: Christian Decker <@cdecker>
2019-06-04 00:27:15 +00:00
Rene Pickhardt 22600faed7 manually added a list-forward manpage because I have no idea how a2x works 2019-05-27 17:35:06 +02:00
Kristaps Kaupe 441c571650 Better describe "urgent", "normal" and "slow" feerates 2019-05-25 23:48:37 +00:00
ZmnSCPxj bbec8f62e0 doc/lightning-pay.7.txt: Remove references to value randomization, since it is no longer implemented, and describe shadow routes.
Fixes: #2659

Value randomization is not implemented since `pay` was made into a plugin.
Nobody has been asking for it, so do not implement it and just remove
from documentation.

Shadow routes is implemented, and not describe, so describe it now.
2019-05-24 19:08:19 +02:00
Rusty Russell 5506924f2f pay: update documentation.
Reported-by: @ZmnSCPxj
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2019-05-22 04:32:34 +00:00
Rusty Russell 8b2a84a0c7 plugins: don't hand empty strings for unset options.
This was deeply surprising to me; there's a difference between a value not being
specified, and it being specified as "".

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2019-05-22 00:18:29 +02:00
Rusty Russell e5b5f1d7e5 openingd: add openchannel hook.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2019-05-20 20:31:07 -04:00
darosior 7e7358ec1e Doc: update 'waitsendpay' manpage
We no longer disable a channel on routing error.
2019-05-19 20:03:05 +02:00
darosior 182556cfda Updated 'listfunds' doc and manpage 2019-05-10 02:06:50 +00:00
Rusty Russell e51a13975f Makefile: don't generate CSVs unless explicitly told to.
ANd rename them: every other "gen" file can be discarded and rebuilt.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2019-05-02 01:20:41 +00:00
GreenAddress fb07265663 remove libbase58, use base58 from libwally (#2594)
* remove libbase58, use base58 from libwally

This removes libbase58 and uses libwally instead.

It allocates and then frees some memory, we may want to
add a function in wally that doesn't or override
wally_operations to use tal.

Signed-off-by: Lawrence Nahum lawrence@greenaddress.it
2019-04-30 23:07:31 +02:00
Christian Decker f82e779f71 check: Run `check-manpages` in /tmp/ instead of the user config
If we have plugins configured in the default config location, then
`check-manpages` may fail due to plugin cli options being added to the
`--help` output.
2019-04-25 21:16:37 -05:00
Rusty Russell 7f7ad4f89f connected_hook: allow hook to specify an error message.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2019-04-23 15:26:42 +02:00
Michael Schmoock 05b1b3f488 doc: adds capacity default values to manpage
- also adds CHANGELOG
- Cleanup: also add defaults for channel fees to manpage
2019-04-16 15:01:28 -07:00
Rusty Russell 43d07aaed2 lightningd: implement invoice hook.
This also allows plugins to do "hold invoices" a-la LND, useful for
just-in-time inventory handling.

We're careful to handle the invoice getting paid behind our backs, and
the incoming HTLC going away.

Once @cdecker's sphinx rework is in, we can also hand the raw payload
to the invoice_payment_hook, for special effects.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2019-04-12 03:32:48 +00:00
Rusty Russell ba41238df9 invoice: allow suffixes.
Makes it much easier to set it to 6 hours, for example.

Fixes: #2551
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2019-04-10 20:03:39 -07:00
Rusty Russell 1d6584e733 invoice: change default expiry to 7 days.
For online services, shorter may be fine, but for casual use I'm usually
in a different timezone than the payer, so needs to be at least 1 day.

Certainly 1 hr is short if they have to open a channel.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2019-04-10 20:03:39 -07:00
Rusty Russell 5009d628a3 lightning-cli: do pretty-printing.
Plugins don't do it right anyway, and we're about to remove it from
lightningd.  Produces same format as json_pp.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2019-04-09 12:37:16 -07:00
Michael Schmoock 0fc9368167 doc: commandline switch min-capacity-sat 2019-04-09 13:20:52 +02:00
darosior b60b09a2ca Update 'withdraw' and 'fundchannel' calls documentation 2019-04-08 21:56:52 +02:00
Rusty Russell ae614c2e96 doc: document the current limitations of the db_write hook.
In theory we could allow a db_write-using plugin to have other
hooks/commands by embargoing their other responses until the exclusive
period is over.  That would be nice for a 'dbmirrorinfo' command, for
example.

The other option would be to *always* go exclusive on a db_write-using
plugin, so responses can never get intermingled.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2019-04-08 01:56:17 +00:00
andrewtoth 90f9985dd2 Update disconnect manpage 2019-04-04 15:13:47 +02:00
Jeff Vandrew Jr 02ddeed2a7 Clean Up Case #5 in Tor Documentation
Case 5 in the Tor documentation currently states that if you use `--bind-addr=autotor:127.0.0.1:9051`, you can get your onion address by running `lightning-cli getinfo`. I have not found that to be the case; with that flag no onion address will be generated.

On the other hand, if `--addr=autotor:127.0.0.1:9051` is used instead, an onion address is generated and `lightning-cli getinfo` behaves as the docs say.
2019-03-29 20:05:04 -07:00
andrewtoth 938addfba8 Cleanup tor doc 2019-03-25 18:52:31 +01:00
Michael Schmoock f1add556d6 doc: setchannelfee 'all' feature 2019-03-19 00:14:09 +00:00
Rusty Russell 2af3996bea doc: document explicitly that you can use prefixes for setchannelfee 'base'
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2019-03-16 03:02:34 +00:00
Michael Schmoock c7ab5102ba doc: adds manpage and changelog 2019-03-15 02:48:18 +00:00
Rusty Russell 435843acfa doc: document UNIX domain sockets in lightning-connect.
We document how to bind to them, just not how to connect to them.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>

1diff --git a/doc/lightning-connect.7 b/doc/lightning-connect.7
index f143563ca..53619c44f 100644
2019-03-14 15:05:56 +01:00
Rusty Russell 3e67c09d5e newaddr: support getting both bech32 and p2sh addresses.
Higher layers consume less addresses this way.

Fixes: #2390
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2019-03-04 15:11:20 +01:00
Rusty Russell 1da8e498c0 doc: fill in parameters in getroute manpage.
Fixes: #2419
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2019-03-01 06:20:58 +00:00
Rusty Russell a988ed70b9 doc/REPRODUCIBLE.md: describe to do reproducible builds.
This is a separate commit, as it describes the results (as sha256sum)
of doing a test on the previous commit.  Obviously these values will
have to updated after a rebase!

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2019-03-01 03:48:04 +00:00
Rusty Russell 1dcc482350 Update CHANGELOG.md for -rc2.
And fix trivial typo in MAKING-RELEASES.md, and date retreival in
build-release.sh and repro-build.sh (real git tags start with v!)

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2019-02-26 04:16:34 +00:00
Rusty Russell ce5d61be32 CHANGELOG.md: order into user impact and coolness, while maintaining sections.
Add the one 'Changelog-fixed' entry from a405c22fc9,
and reorder a bit.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2019-02-23 10:19:33 +00:00
Rusty Russell 203ef2ed0b listsendpays: updated version of listpayments.
New name is less confusing, and most people should be transitioning to
listpays rather than this anyway.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2019-02-23 05:45:25 +00:00
Rusty Russell 56dfbec6bd listpays: new command to summarize pay commands.
This is to future-proof against multi-part-payments: the low-level commands
will start returning multiple results once we have that, so prepare
transition plan now.

Closes: #2372
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2019-02-23 05:45:25 +00:00
Rusty Russell e0605466bf doc: update listpayments man page to match current semantics.
It didn't show the optional parameters, and the output fields were
obsolete.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2019-02-23 05:45:25 +00:00
Rusty Russell 1ec959752b plugin/pay: rename 'description' to 'label', deprecate 'description'.
This is the same deprecation, but one level up.  For the moment, we
still support invoices with a `h` field (where description will be
necessary) but that will be removed once this option is removed.

Note that I just changed pylightning without backwards compatibility,
since the field was unlikely to be used, but we could do something
more complex here?

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2019-02-23 05:45:25 +00:00
Rusty Russell 919f390a93 sendpay: rename 'description' to 'label'.
This field was used by `pay` to hold the bolt11 description if the bolt11
string used `h` to hash the description (which nobody ever did).  If the
`h` field wasn't present, it could contain anything, as it wasn't checked.

It's really useful to have a label for payments (eg. '1 Cuban'), but adding
yet-another option would be painful, so we simply rename 'description'
to 'label' except inside the db.

This means we need to do some tricky parameter parsing to handle array
and keyword JSON arguments, but only until we remove the old name.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2019-02-23 05:45:25 +00:00
Rusty Russell 5e14274f41 sendpay: provide 'bolt11' parameter.
Without this, there's no proof of payment, since it is the signed invoice
that make the receipt valid.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2019-02-23 05:45:25 +00:00
Rusty Russell f83e57d68d doc: update getroute manpage in line with last commit.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2019-02-23 04:32:36 +00:00
Rusty Russell f5dc8b9d52 JSON: allow any number of decimal points when parsing 'btc' suffix.
I tried to fundchannel 0.01btc, and of course it wanted 8 decimals exactly.
If I can't get this right, it's probably a bad idea.

I still don't allow whole number of btc though, since that's probably a mistake
and you're not supposed to put that much in c-lightning yet :)

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2019-02-23 03:09:37 +00:00
Christian Decker 816f20d1c0 docs: Autodetect version and copyright year in the sphinx doc
Signed-off-by: Christian Decker <decker.christian@gmail.com>
Suggested-by: Rusty Russell <@rustyrussell>
2019-02-22 17:55:36 +01:00
Conor Scott af750d802d Switch to libsodium-dev for ubuntu install instructions 2019-02-21 09:14:39 +00:00
Rusty Russell 52c843f708 CHANGELOG, documentation: update changelog to reflect suffix changes.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2019-02-21 03:44:44 +00:00
Christian Decker 9b721ceca7 plugin: Add docs for hooks
Signed-off-by: Christian Decker <decker.christian@gmail.com>
2019-02-20 15:37:59 +01:00
Michael Schmoock 3db534580c doc: add configure --enable-dev in testing chapter
As a newbie, I forgot to re-enable the dev options that are required to run the tests...
2019-02-18 02:42:29 +00:00
Christian Decker e11ddfc992 docs: Add configuration for the sphinx documentation generator
This just takes the existing documentation, and generates a nice HTML
version we can point users to. The documentation is automatically
generated on every commit to `master` and will be deployed here:

https://lightning.readthedocs.io/

Signed-off-by: Christian Decker <decker.christian@gmail.com>
2019-02-18 02:42:29 +00:00
Christian Decker 886700454d docs: Consolidating header hierarchy slightly
This is a preparatory step for the automatic documentation generation
that is going to use `sphinx-doc`. Each document should include a top
level header that matches the name and scope of the document and all
following headers should be of a lower level than the top-level
header.

Signed-off-by: Christian Decker <decker.christian@gmail.com>
2019-02-18 02:42:29 +00:00
Alekos Filini 21afe1c0f4 doc: fix the command to cross-compile libgmp 2019-02-18 00:09:20 +00:00
Simon Vrouwe 201dd3ce0c doc: improve explanation of getroute command 2019-02-17 21:48:24 +01:00
Simon Vrouwe 4fe60ee769 doc: fundchannel command, clarify optional `feerate`
mentioned in issue #2354
2019-02-17 21:48:24 +01:00
Mark Beckwith 3e4a3bafc3 doc: fix connect manpage parameter names and...
also fixed grammar and consistency with other manpages.

The names are now the same as what json_connect() expects.

Signed-off-by: Mark Beckwith <wythe@intrig.com>
2019-02-11 18:28:45 +01:00
Rusty Russell d413fc7e9b configure: use system libbase58 if available.
Also one less headache for reproducible builds.  But unlike
libsodium, this only seems common in Ubuntu.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2019-02-08 01:10:17 +00:00
Rusty Russell 21fd8f7eaa configure: use system libsodium if available and modern.
Also one less headache for reproducible builds.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2019-02-08 01:10:17 +00:00
Rusty Russell 53c0a21d2c plugins: get usage from plugins (required unless deprecated_apis == True).
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2019-02-07 20:33:50 +00:00
fanquake 132d8460fc doc: skip building bitcoin-qt on macOS
Skip installing GUI dependancies and building bitcoin-qt.
2019-02-07 03:23:03 +00:00
Rusty Russell 3ae0c20026 getroute: change definition (and pay default) for riskfactor.
Up until now, riskfactor was useless due to implementation bugs, and
also the default setting is wrong (too low to have an effect on
reasonable payment scenarios).

Let's simplify the definition (by assuming that P(failure) of a node
is 1), to make it a simple percentage.  I examined the current network
fees to see what would work, and under this definition, a default of
10 seems reasonable (equivalent to 1000 under the old definition).

It is *this* change which finally fixes our test case!  The riskfactor
is now 40msat (1500000 * 14 * 10 / 5259600 = 39.9), comparable with
worst-case fuzz is 50msat (1001 * 0.05 = 50).

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2019-02-06 18:39:52 +01:00
Simon Vrouwe 10057c8335 openingd/json_fund_channel:
- result fundchannel command now depends on successful or failed broadcast of the funding tx
- failure returns error code FUNDING_BROADCAST_FAIL
- don't fail the channel when broadcast failed, but keep in CHANNELD_AWAITING_LOCKIN
- after fixing the initial broadcast failure, the user could manually rebroadcast the tx and
  keep the channel

openingd/opening_funder_finished:
- broadcast_tx callback function now handles both success and failure

jsonrpc: added error code FUNDING_BROADCAST_FAIL
manpage: added error code returned by fundchannel command

This makes the user more aware of broadcast failure, so it hopefully doesn't
try to broadcast new tx's that depend on its change_outputs. Some users have reported (see
issue #2171) a whole sequence of fundings failing, because each funding was using the change
output of the previous one, which would not confirm.
2019-01-29 04:50:01 +00:00
Christian Decker 0266c33476 cleanup: Fix a typo in the sendpay manpage
Signed-off-by: Christian Decker <decker.christian@gmail.com>
2019-01-29 00:50:09 +00:00
Mark Beckwith 287af7b660 docs: fix getroute manpage rendering
My manpage viewer did not know what to do with curly braces,
so I switched them to quotes and it works fine.

Signed-off-by: Mark Beckwith <wythe@intrig.com>
2019-01-23 13:43:41 -08:00
Rusty Russell 390117c9bb docs: document changes to waitsendpay command.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2019-01-23 22:08:08 +01:00
Rusty Russell dc2ee9639b listchannels: allow source arg to list channels by their source node.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2019-01-15 12:01:38 +01:00
Rusty Russell 1567238dd9 invoice: option to expose/not-expose private channels.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2019-01-15 12:01:38 +01:00
Rusty Russell f321b1d35f getroute: remove seed arg, document fromid, make default fuzzpercent match docs.
seed isn't very useful at this level: I've left it in routing.c
because it might be useful for detailed testing.  Pretty sure it's unused,
so I simply removed it.

The fuzzpercent is documented to default at 5%, but actually was 75%.
Fix that too.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2019-01-15 12:01:38 +01:00
Rusty Russell 61420bf79b configure: (mostly) revert b7a56f0531
Plugins are a first-class citizen again.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2019-01-15 02:52:13 +00:00
Rusty Russell 75df22e9e2 doc/MAKING-RELEASES: clarifications based on previous release.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2019-01-15 02:18:30 +00:00
Conor Scott a2413f47e5 [doc] rename plugins.md -> PLUGINS.md... because the rest were uppercase 2019-01-14 18:45:08 +01:00
Christian Decker b7a56f0531 plugin: Gate the plugin subsystem with the --enable-plugins configure flag
Since we are planning to release a bug fix release, and the plugin
subsystem is not yet complete, it is better to make plugin support
opt-in while we continue testing.

Signed-off-by: Christian Decker <decker.christian@gmail.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2019-01-10 17:15:10 -08:00
Conor Scott 2ee1061c16 [docs] Add missing 'level' description for listpeers manpage. 2019-01-08 15:35:17 -08:00
Michael Hawkins 22921f1ab1 Manpage for lightning-listchannels created 2019-01-08 23:02:17 +00:00
arowser 38ceb9a736 update the raspiberry build process 2019-01-04 22:47:25 +01:00
Christian Decker 69953bcb2a plugin: Document JSON-RPC passthrough and notifications
Signed-off-by: Christian Decker <decker.christian@gmail.com>
2018-12-30 14:36:02 +01:00
Mark Beckwith d18d950a0a doc: check manpage
Signed-off-by: Mark Beckwith <wythe@intrig.com>
2018-12-10 09:27:49 +01:00
Franck Royer dc7b76e5e6 Update testing requirements and instructions 2018-12-09 16:26:30 +01:00
lisa neigut c497bad2e9 changelog + docs: Add entries for `announce` option on `fundchannel` 2018-12-08 15:15:55 -08:00
Rene Pickhardt c420f04d66 added more hints what to consider when loading several plugins
now the documentation also explains via command line example how to load several plugins
2018-12-08 09:51:59 +01:00
Rene Pickhardt f8d630a30c emphasized that a plugin needs to be executable
cost me a couple of minutes.
2018-12-08 09:51:59 +01:00
Michael Hawkins 1c3b8c8ec5 Created listpeers asciidoc, generated manpage using a2x and updated Makefile 2018-12-08 00:28:56 +00:00
Michael Hawkins 561a66354b Man page for lightning-disconnect created 2018-12-05 01:26:01 +00:00
Rusty Russell aa4284a35e docs: document plugin options.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-12-05 01:22:55 +01:00
Rusty Russell 31830ea6bb doc: Use subsections for option types.
And drive-by fix "if it's seems" to "if it seems".

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-12-05 01:22:55 +01:00
Christian Decker 82393036e3 plugin: Update documentation of the rpcmethods
Suggested-by: Lisa Neigut <@niftynei>
Signed-off-by: Christian Decker <decker.christian@gmail.com>
2018-12-02 22:55:47 +00:00
Christian Decker c90be02372 docs: Replace example method params with a long description
This matches the `verbose` field in `struct json_command`.

Signed-off-by: Christian Decker <@cdecker>
2018-11-26 22:53:37 +00:00
ZmnSCPxj e74349c506 doc/lightning-pay.7.txt: Clarify randomization by `pay` command. 2018-11-26 22:25:25 +00:00
Jonas Nick da431333b8 Fix default lightning datadir in lightningd-config doc 2018-11-23 00:46:14 +01:00
Rusty Russell 56fd2541c3 doc: make it clearer that specifying addr etc disables autolisten.
Reported-by: Greg Sanders
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-11-21 03:09:03 +00:00
Christian Decker 74c58e9f25 docs: Add an initial draft of the plugin documentation
Signed-off-by: Christian Decker <@cdecker>
2018-11-13 00:44:50 +01:00
Christian Decker 59e37c12cd plugin: Add plugins to lightningd and register arguments 2018-11-13 00:44:50 +01:00
Rusty Russell d4f164eb39 Release: add helper script for release, and checklist for the process.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-10-31 10:56:44 +10:30
Rusty Russell e1b1abd328 doc: fix argument documentation for lightning-sendpay.
The parameter is 'payment_hash' not 'hash', and the 'description' parameter
wasn't documented at all.

Reported-by: @darosior
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-10-23 16:47:32 +02:00
trueserve dbb9b0c077 options: Parse config file before opening working directory
Right now, the `config` file is read *after* the configuration working directory is moved to in the software. However one configuration option `lightning-dir` settable in the `config` file sets this working directory. As the directory is already opened (which defaults to `$HOME/.lightning`) before the configuration is read, the configured directory will not be used.

This patch parses the configuration file before opening the working directory, fixing this bug.

[ Update CHANGELOG.md and man pages -- RR ]
2018-10-13 04:09:49 +00:00
lisa neigut 9d496f9a74 hacking: install `cppcheck` and `shellcheck`
You need `cppcheck` and `shellcheck` installed to run `check-source`
successfully.
2018-10-09 00:08:41 +02:00
Rusty Russell f9fba1d7c6 doc/lightning-invoice: document warnings.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-09-28 15:03:42 +02:00
lisa neigut 2327f04b54 HACKING.md: Update rec'd test cmd to `full-check`
Otherwise you won't run `check-source` and your Travis build will
fail on you.

Also remove comment about how it's currently disabled cuz that's a lie.
2018-09-21 00:21:20 +00:00
Christian Decker 674d176087 doc: Update docs to remove 100% upper bound
Actual change is in the previous commit.
2018-09-20 02:41:28 +00:00
Wladimir J. van der Laan 634f19a7b2 doc: Regenerate man-pages after spelling corrections 2018-09-07 22:46:56 +02:00
Wladimir J. van der Laan 6a4468edca doc: Spelling corrections 2018-09-07 22:46:56 +02:00
Rusty Russell 312209ad60 pytest: support simple subdaemon debugging.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-09-04 14:36:05 +02:00
Rusty Russell 7b9341e762 subdaemon: better GDB support.
It was annoying me, so I made it much nicer to use.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-09-04 14:36:05 +02:00
Rusty Russell 8bc845d7b6 lightningd: inline overview documentation (part 1 of 8).
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-09-03 05:01:40 +00:00
Rusty Russell db3c387264 feerate: allow names 'urgent' 'normal' and 'slow'.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-08-30 16:33:35 +02:00
Rusty Russell e0952ceff2 feerate: use suffix, not separate argument.
And, reluctantly, default to bitcoind style.
"It's wrong to be right too soon."

Suggested-by: @cdecker
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-08-30 16:33:35 +02:00
Christian Decker b270ab02ec docs: Compile man-pages
Travis is still struggling with `a2x` for some reason.
2018-08-30 16:33:35 +02:00
Rusty Russell 14dc1c37ab fundchannel / withdraw: allow explicit feerate setting.
These are the two cases where we'll refuse without a fee estimate.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-08-30 16:33:35 +02:00
Rene Pickhardt 7635b24a29 changed formatting for better readability on github
* changed formatting for better readability on github
2018-08-28 03:38:58 +00:00
Rusty Russell 9d517ddc1d options: remove default-fee-rate now we don't use it.
And no more filtering out messages, as we should no longer spam the
logs with them (the 'Connected json input' one was removed some time
ago).

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-08-25 00:33:12 +00:00
Rusty Russell 213be90e77 log: implement reopening log-file on SIGHUP
Closes: #1623
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-08-23 12:51:08 +02:00
conanoc 80a875a9a5 Update HACKING.md
Added some info in debugging section.

[ Squashed: Guide to use configure. --RR ]
2018-08-18 23:37:43 +00:00
Christian Decker ae99e493b8 pytest: Remove test_lightningd and all the legacy testing framework 2018-08-07 00:54:19 +00:00
gabridome 2db832ab3e Errors corrected
Also:
- the lines of code that contain more than one elements are no more inline. 
   This should improve visualization in small screens (no auto line wrapping).
- Found a "solution" for the references: people looking at markdown presentation
   will see one only reference to the Tor project.
   In the text source all the "references" are shown and also serve in markdown as 
   hypertext links.
Feel free to improve.
2018-08-03 02:23:48 +00:00
gabridome b4cb4da232 In-document links don't work if "." is present
When you refer to a title of the doc in a link and the title has a dot, you have to drop it when you build the link.
2018-08-03 02:23:48 +00:00
gabridome f95ef5f3ff Suggested changes incorporated.
- difference between --bind-addr=autotor and --addr=autotor
- typos corrected (non-persistent and Tor)
- "references" dropped
- table improved
- Outgoing case explained where is useful
The actual structure suffers of many repetitions. I could work on 
a compact structure based on a "decision tree modular" approach if that 
may seem useful.
2018-08-03 02:23:48 +00:00
gabridome a92d7f1490 File improvements
Adapted for the markdown format.
Also developed in the preparation parts and each case of use has been detailed.

A doubt in the non persistent address remain:
In the original document 

> --announce-addr=autotor:<torservice_ip:port> : try to generate an temp V2 onion addr.

 this doesn't seem to work for me (several errors are produced at start up).
instead the `--addr=autotor:127.0.0.1:9051`seems to work well (at least for version 0.6).
2018-08-03 02:23:48 +00:00
Rusty Russell 52303029aa fundchannel: cap 'all' at 2^24-1 satoshi.
The easiest way to do this is to play with the 'wallet_tx' semantics
and have 'amount' have meaning even when 'all_funds' is set.

Note that we change the string 'Cannot afford funding transaction' to
'Cannot afford transaction' as this code is also used for withdrawls.

Inspired-by: molz on #c-lightning
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-07-30 11:46:41 +02:00
Christian Decker 55d450ff00 pay: Exempt a fee from the maxfeepercent rule it is still tiny
Several users have noticed that they cannot pay satoshis.place or similar places
that have tiny payment amounts if they are not directly connected. This is due
to the forwarding fee dominating the transferred amount.

This commit adds a new option, exempting tiny fees (up to 5 satoshis by default)
from having to pass the maxfeepercent flag. While we could have told users to
tweak maxfeepercent I think it is usefull to have a default exemption.

[Squashed --RR]
2018-07-30 01:05:43 +00:00
William Casarin 6e4745b28a doc: update python test requirements in HACKING
Signed-off-by: William Casarin <jb55@jb55.com>
2018-07-26 23:18:37 +02:00
Mark Beckwith 369bd274a1 Updated docs to reflect bech32 default
The manpage did not specify the name of the named parameter (addresstype).
It does now.

Fixed manpage grammar errors.

Signed-off-by: Mark Beckwith <wythe@intrig.com>
2018-07-23 23:46:06 +00:00
Mark Beckwith 05d4e8519c improved testing section
I went to the Nakamoto dinner last week and told some guys they
could get involved by improving our test coverage. So I updated
the docs for newbs like me. (I only recently discovered `PYTEST_PAR`).

Signed-off-by: Mark Beckwith <wythe@intrig.com>
2018-07-23 02:21:36 +00:00
wintercooled e0a5c8144e Change withdrawal documentation failure outcome - referred to channel not transaction. (#1726)
Text related to channel funding not withdrawal.
2018-07-20 22:55:11 +02:00
arowser 97118c558e add --conf parameter 2018-07-15 09:45:55 +00:00
Rusty Russell fed5a117e7 Update ccan/structeq.
structeq() is too dangerous: if a structure has padding, it can fail
silently.

The new ccan/structeq instead provides a macro to define foo_eq(),
which does the right thing in case of padding (which none of our
structures currently have anyway).

Upgrade ccan, and use it everywhere.  Except run-peer-wire.c, which
is only testing code and can use raw memcmp(): valgrind will tell us
if padding exists.

Interestingly, we still declared short_channel_id_eq, even though
we didn't define it any more!

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-07-04 23:57:00 +02:00
Sjors Provoost f7dabd4fd8 Armbian build instructions 2018-07-03 11:49:55 +02:00
Rusty Russell c46f373205 options: refuse two --announce-addr of the same type.
Gossipd will ignore the second one, but doing it in the front end
gives an explicit error message.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-07-01 15:03:21 +02:00
Rusty Russell 846d2f8726 doc/INSTALL.md: add configure step to instructions.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-06-21 14:00:23 +02:00
Rusty Russell 1fc9770cfe doc/INSTALL.md: fix up Fedora instructions.
We need sudo on all the commands, and we have more dependencies (esp. if
we want to do development).

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-06-21 14:00:23 +02:00
Rusty Russell 14a5cbb820 doc/INSTALL.md: use requirements.txt for pip installs.
We actually need more than just python-bitcoinlib for testing.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-06-21 14:00:23 +02:00
Christian Decker 1bfa02d877 opts: Add option to disable DNS lookups
Mainly used to disable `gossipd` reaching out to the DNS seeds during testing.

Signed-off-by: Christian Decker <decker.christian@gmail.com>
2018-06-21 11:21:16 +02:00
Christian Decker 654fa9d680
doc: Fixed typo in the release notes
Signed-off-by: Christian Decker <decker.christian@gmail.com>
2018-06-18 12:45:00 +02:00
Rusty Russell 7f508cca5f wallet: clarify error 302.
"Dust limit unmet" seems undescriptive to me.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-06-18 12:33:25 +02:00
Mark Beckwith f4eda74789 adding manpages 2018-06-18 12:33:25 +02:00
Mark Beckwith 8f0ef1636f Added wallet related error codes
New codes: FUND_MAX_EXCEEDED, FUND_CANNOT_AFFORD, FUND_DUST_LIMIT_UNMET.

The error message "Cannot afford fee" was not exactly correct because
it would also occur if the amount requested could not be afforded.  So
I changed it to the more generic "Cannot afford transaction".

Other things:

* Fixed off-by-one satoshi in fundchannel manpage.
* Changed 'arror' to 'error' because we are not pirates.
2018-06-18 12:33:25 +02:00
Rusty Russell a5aaf82ed2 release-notes:
Feedback from @wythe and @cdecker
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-06-18 12:30:31 +02:00
Rusty Russell 2180ff0a72 Release notes for 0.6 "I Accidentally The Smart Contract"
Written by Christian Decker wth feedback from Shannon Appelcline.
Special thanks to Fabrice Drouin of ACINQ fame for choosing the release
name!
2018-06-18 12:30:31 +02:00
Corné Plooy 94ef0a7fbf Add 'make ncc' target, for source code analysis. 2018-06-15 16:49:35 +02:00
arowser 4429c6e7cd udpate broken link 2018-06-08 17:56:48 +02:00
Rusty Russell 72d103d6bb Makefile: import config.vars.
We leave VALGRIND env var as an override for testing.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-06-08 17:56:01 +02:00
Rusty Russell 083a2cee07 zlib: add as a requirement.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-06-06 03:25:56 +00:00
Jan Sarenik b28d71a9a5 external/Makefile: Change variable HOST to MAKE_HOST
Proposed fix for issue #1231 - FreeBSD (tcsh) build problem due
to HOST environment variable.

The variable is used for cross-compilation. The process may be
improved even further in the future. So far this hot fix.
2018-05-23 23:08:17 +00:00
Jan Sarenik 8d641456a1 doc/HACKING.md: remove note about DEVELOPER mode being default
The DEVELOPER mode is not the default since 00e75fee,
change the documentation accordingly.
2018-05-23 00:20:55 +00:00
Rusty Russell a2dc3d02a8 locktime-blocks: rename to watchtime-blocks.
And clarify the descriptions for end users.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-05-20 02:32:42 +00:00
Rusty Russell babfddeb3e lightningd: make --commit-time in milliseconds.
It was the only place we used opt_time, so cuts out much code.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-05-20 02:32:42 +00:00
Rusty Russell 226f0d63d2 lightningd-config.5.txt: working and typos feedback.
Thanks to @ajtowns and @ZmnSCPxj.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-05-20 02:32:42 +00:00
Rusty Russell 626e9fed16 Makefile: add check that manpage and command options match.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-05-20 02:32:42 +00:00
Rusty Russell 8aca5c5d33 doc/lightningd-config.5: manual page for all our configuration options.
In particular, the subtleties of 'addr' vs 'bind-addr' and 'announce-addr'
needed spelling out.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-05-20 02:32:42 +00:00
Saibato 8659745ca6 update TOR.md to latest changes
Signed-off-by: Saibato <saibato.naga@protonmail.com>
2018-05-15 07:16:43 +00:00
Rusty Russell 2bc9d7594c doc/TOR.md: update for new options.
Currently the Tor port for autotor is always 9735; the --port option
is deprecated, though we could append an optional '[@portnum]' to
'autotor' if people want it.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-05-10 02:28:44 +00:00
Saibato 877f63e99e Initial TOR v2/v3 support.
This is a rebased and combined patch for Tor support.  It is extensively
reworked in the following patches, but the basis remains Saibato's work,
so it seemed fairest to begin with this.

Minor changes:
1. Use --announce-addr instead of --tor-external.
2. I also reverted some whitespace and unrelated changes from the patch.
3. Removed unnecessary ';' after } in functions.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-05-10 02:28:44 +00:00
Mark Beckwith 9153688b77 Added fundchannel man page.
This describes 'fundchannel' as it works today.

It definitely could use better error codes instead of -1 for everything.
2018-05-08 07:11:35 +00:00
Christian Decker 700a505727 doc: Remove libsodium-dev dependency, it's in-tree
Signed-off-by: Christian Decker <decker.christian@gmail.com>
Reported-by: Perlover <@Perlover>
2018-05-06 14:07:13 +02:00
ZmnSCPxj e588737511 peer_control: Have `close` accept channel IDs also. 2018-05-03 22:47:07 +02:00
Felix 52c243852e documentation: s/Protocol/Command/ 2018-04-27 14:00:16 +02:00
Felix 00783884f7 documentation: connect 2018-04-27 14:00:16 +02:00
Felix 1fc5dc94c4 documentation: newaddr, listfunds and withdraw 2018-04-27 14:00:16 +02:00
ZmnSCPxj 2e73317a39 invoice: Define specific error codes for duplicate label and preimage. 2018-04-26 11:42:17 +00:00
ZmnSCPxj eb42804fcc invoice: Support providing preimage when making invoice. 2018-04-24 11:54:02 +02:00
ZmnSCPxj 2cee1ab20f peer_control: Make close wait for complete closure, with timeout.
Also report tx and txid, and whether we closed unilaterally or
bilaterally, if we could close the channel.

Also make a manpage.

Fixes: #1207
Fixes: #714
Fixes: #622
2018-04-23 05:24:46 +00:00
BT 4673ba6a0a Add in sudo apt-get update into ubuntu
Add in sudo apt-get update into ubuntu instructions because sometimes the process fails if not updated
2018-04-22 21:18:16 +02:00
ZmnSCPxj 0a586acf6e lightning-autocleaninvoice.7: Properly generate instead of using an empty file.
Strange behavior where `a2x` sometimes does not work at all.
2018-04-18 12:37:15 +02:00
Rusty Russell 09c4203767 bolt11: allow multiple fallback addresses.
We can have more than one; eg we might offer both bech32 and a p2sh
address, and in future we might offer v1 segwit, etc.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-04-06 14:26:53 +02:00
Douglas Roark 5e23dccb3b Add cross-compile instructions for Raspberry Pi (#1263)
These are basic instructions that lead to the build process completing without error (after a known error occurs and is rectified). For now, the final results are untested.
2018-04-03 16:10:13 +02:00
ZmnSCPxj 26f7014813 payalgo: Add maximum delay.
Fixes: #1086
2018-04-03 04:29:48 +00:00
ZmnSCPxj bc5fc692d1 pay: Let `sendpay` modify the recorded `msatoshi` of payments. 2018-03-30 15:40:32 +02:00
Rusty Russell a85ead7058 invoice: allow numeric labels again.
Fixes: #1291
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-03-30 00:01:10 +02:00
Mark Beckwith 217d4f99eb Added link to macOS in install index.
Also, technically, the name of the current version of the OS is macOS, so I
updated it.
2018-03-26 01:05:11 +00:00
Rusty Russell 880c19eb4e doc: document restrictions on invoice RPC.
In particular: label must be a string, and description cannot use any
the JSON unicode escapes, which should be unnecessary with UTF-8
anyway.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-03-26 00:20:53 +00:00
practicalswift 0bf1b01425 Fix typos 2018-03-25 15:53:01 +02:00
conanoc cbe0b2d3a8 Update Install.md to add Mac section (#1225)
* Update Install.md to add Mac section
2018-03-22 13:41:29 +01:00
Douglas Schilling Landgraf 35e85ab901
Documentation (#1238)
* build: update INSTALL.md to include Fedora #1028

* doc: Add TOC to INSTALL.md

* doc: Use lower case for anchors in TOC and minor changes

- anchors require lower case
- TOC doesn't work with dots, using OS names

* doc: improving FreeBSD doc

- Add missing packages: gmp and asciidoc
- Include step gmake install
2018-03-21 20:56:57 +01:00
ZmnSCPxj 159e736fc1 invoices: Implement autocleaninvoice. 2018-03-20 17:25:51 +01:00
ZmnSCPxj 3b0081aebb invoices: Add delexpiredinvoice command. 2018-03-20 17:25:51 +01:00
ZmnSCPxj 7443bf5ed5 doc: Update for latest 'pay' command. 2018-03-19 00:27:55 +00:00
ZmnSCPxj 39d8f64226 doc: Update manpages for change in return value. 2018-03-16 01:24:43 +00:00
Rusty Russell a935ae0711 doc: Link STLYE.md from HACKING.md
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-03-16 00:16:10 +00:00
Rusty Russell 08f4d48b0f Add some Style.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-03-16 00:16:10 +00:00
ZmnSCPxj 8fd71ad654 doc: Update sendpay and waitsendpay manpages. 2018-03-14 05:33:09 +00:00
Jan Sarenik 9b3e8f0bd3 bitcoin.bib: Add Satoshi paper URL and date
Date according to Wikipedia which cites other source.
2018-03-04 03:22:32 +01:00
Jan Sarenik fd338c0689 doc: More plain-text improvements to HACKING.md and INSTALL.md
This time the rendered output is slightly different, but mostly
because long preformatted lines are wrapped and contain an extra
continuation backslash now.
2018-03-04 03:21:59 +01:00
Jan Sarenik 960548f311 doc: Reflow HACKING.md and INSTALL.md without textual change
See previous commit 9504a77b for a script to prove there is no
change in the rendered file, just readability plain-text
improvements.
2018-03-04 03:21:59 +01:00
ZmnSCPxj 6c9d81ef42 payalgo: Remove reporting PAY_TRY_ANOTHER_ROUTE and PAY_UNPARSEABLE_ONION.
These error codes will cause `pay` to retry, so `pay` will never
actually report those error codes.
Those error codes will only get reported at the `sendpay` level.
2018-02-27 13:38:32 +01:00
Igor Cota 694fb41ef6 Update INSTALL.md 2018-02-27 13:32:51 +01:00
Igor Cota 642cff84ea Update INSTALL.md
Add Android build instructions
2018-02-27 13:32:51 +01:00
ZmnSCPxj 1cf32f9f05 doc: Update manpage for getroute and pay for route randomization. 2018-02-26 02:36:27 +00:00
ZmnSCPxj 38535fc36c payalgo: Create a new failure for paying expired invoice. 2018-02-18 13:51:37 +01:00
ZmnSCPxj 4e382ebd94 doc: Mention keyword arguments, update pay to mention use of null. 2018-02-12 09:30:16 +01:00
ZmnSCPxj 203c222f57 doc: Update to add fee limit to pay. 2018-02-09 12:44:33 +01:00
practicalswift 4f4756bd20 Fix a-vs-an typos 2018-02-08 22:49:34 +01:00
ZmnSCPxj d4478458dd pay: Change origin_index to erring_index, start with local node = 0. 2018-02-06 17:05:12 +01:00
ZmnSCPxj b7c9029fe3 doc: Update for new error codes of sendpay. 2018-02-06 17:05:12 +01:00