Commit Graph

90 Commits

Author SHA1 Message Date
Christian Decker
3532288db1 probe: Add the traceroute method to the probe plugin
This just tries all prefixes of a route to the given node, returning a failure
as soon as it hits the channel that got the payment stuck.

Signed-off-by: Christian Decker <decker.christian@gmail.com>
2019-09-02 22:58:48 +02:00
Christian Decker
8b24e19bbb probe: Add probe-stats method to show some general statistics
Signed-off-by: Christian Decker <decker.christian@gmail.com>
2019-09-02 22:58:48 +02:00
Christian Decker
e4f8d2d0b8 probe: Poll for probe completion instead of waiting
This just polls pending probes and calls a callback upon completion.

Signed-off-by: Christian Decker <decker.christian@gmail.com>
2019-09-02 22:58:48 +02:00
Christian Decker
0484d88cda probe: Made probe an async_method so we can run in parallel
Since `probe` may take a while, or hang altogether we better make it async so
we can run multiple ones in parallel. The next step is to have a sweeper
thread that just checks all pending probes.

Signed-off-by: Christian Decker <decker.christian@gmail.com>
2019-09-02 22:58:48 +02:00
Christian Decker
439ff65f14 probe: Allow probing for a specific node
Signed-off-by: Christian Decker <decker.christian@gmail.com>
2019-09-02 22:58:48 +02:00
Michael Schmoock
bdd19f82a8 sendinvoiceless: round HTLC fees up 2019-09-02 22:58:01 +02:00
Michael Schmoock
39bc7b6deb fix: making sum() of funds iteration did not work on non-numeric 2019-09-02 22:55:42 +02:00
Matt Whitlock
477bdd8f61 rebalance: round HTLC fees up
BOLT#7 requires that nodes "SHOULD accept HTLCs that pay a fee equal to or greater than:
fee_base_msat + ( amount_to_forward * fee_proportional_millionths / 1000000 )".

The code in rebalance.py:setup_routing_fees was not strictly meeting the above requirement, as it was using truncating integer division to calculate the proportional part of the fee, which typically results in a fee that is strictly less than the theoretical, infinite-precision, required fee. Some node implementations may allow rounding down here, but some do not, resulting in sporadic WIRE_FEE_INSUFFICIENT errors.

This commit changes the fee calculation in setup_routing_fees so that it always rounds up to the next whole millisatoshi, thereby eliminating many WIRE_FEE_INSUFFICIENT errors and improving the success rate of the rebalance command.
2019-08-29 14:13:57 +02:00
Simon Vrouwe
9e25aad3d1 helpme: Wrap response in simple format-hint, so lightning-cli prints it as -H 2019-08-16 15:20:34 +02:00
darosior
5a0a3a215f Add a 'requirements.txt' to probe plugin
And remove blank lines from monitor's and persistant-channels' requirements
2019-08-13 13:56:49 +02:00
darosior
65be1cedbe Specify startup-only plugins to be non-dynamic 2019-08-13 13:56:22 +02:00
darosior
93cb498c04 Add a link to the reckless plugin manager 2019-08-12 23:46:43 +02:00
Douglas Rohde
f179522c1c functional peer searching
missing imports, handle RPCError

add dnspython requirement

some error handling when connecting to peers
2019-08-12 19:20:29 +02:00
Christian Decker
62498ed1de added a monitoring plugin to see health of peers and channels 2019-07-27 01:12:06 +02:00
Rusty Russell
5bb3061ade helpme: new plugin.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2019-07-26 15:29:59 +02:00
darosior
6cebe21ff7 Add Javascript library 2019-07-26 15:26:16 +02:00
darosior
5eeb5dda0a Add C++ plugins library 2019-07-26 15:26:16 +02:00
Christian Decker
0d5322eeec csvexportpays: Added submodule to export payments as a CSV 2019-07-18 19:21:51 +02:00
Richard Bondi
899f0a0867 add remoteRPC plugin 2019-06-17 21:47:57 +02:00
Michael Schmoock
cd1b751f53 rebalance: fix route direction
This will set the correct `direction` on manual route hops (in/out).
Before this was not set, resulting in WIRE_FEE_INSUFFICIENT errors,
if fee was calcualted inconsistently with `direction`.
2019-06-11 15:56:36 +02:00
Michael Schmoock
300b963c9d rebalance: fix amount None 2019-06-03 19:26:26 +02:00
Michael Schmoock
f6309a2da0 Cleanup rebalance sendinvoiceless (#33)
* doc: cleanup and key-value for optional parameters

* rebalance: cleanup and refinements

* sendinvoiceless: cleanup and refinements

* summary: reflects upcoming changes of pylightning to_approx_str

* rebalance: check peer connection on local channels
2019-05-31 22:52:43 +02:00
Ján Sáreník
6d9c5a1f3c Summary: autopilot: add requirements.txt (#34) 2019-05-28 12:06:38 +02:00
Michael Schmoock
89c95e4fe8 rebalance: fix issue 29
I think this issue happens on older version of pylightning only.
2019-05-23 12:32:25 +02:00
fiatjaf
ec3037388c add my own plugin collection
At https://github.com/fiatjaf/lightningd-gjson-rpc/tree/master/cmd.
Including `waitpay` and `webhook` plugins for now.
2019-05-21 11:35:23 +02:00
Michael Schmoock
ac73bcaf20 doc: auto plugin directories. main repo issue 2647 2019-05-21 11:33:30 +02:00
Darosior
833f418c10 Added lightning-qt as a submodule (#28) 2019-05-16 20:28:25 +02:00
Michael Schmoock
4c46275e38 fix: rebalance channel selection
The channel selection query didnt filter for channels not
having a short_channel_id yet (unconfirmed ones).

This lead to a KeyError whenever an unconfirmed channel existed.
2019-05-13 21:23:59 +02:00
Michael Schmoock
12a80b2c13 feat: summary adds descriptive table header 2019-05-13 21:23:23 +02:00
Stadicus
6d0df3c83b add lightningd blockheight metric
This metric is useful on initial sync, when bitcoind is already synced, but lightningd is still working through the blocks.
Comparing the two measures allows to calculate the indexing progress.
2019-05-13 21:21:36 +02:00
Michael Schmoock
34f81103a4 doc: remove duplicated installation instructions 2019-05-13 14:04:05 +02:00
Michael Schmoock
dce2f8fea2 doc: general installation instructions 2019-05-13 14:04:05 +02:00
Michael Schmoock
8311122645 fix: a race condition in the summary plugin
When the summary plugin starts, it runs a thread to discover the current
`fiat_per_btc` price. When this was not finished yet, the `if` statement
in line 112 fails, because this in not JavaScript and the property has
to be checked with `hasattr(obj, key)` method in order to not throw an
exception.
2019-05-13 14:02:45 +02:00
Joe Netti
3f48b475cf new change to graphql 2019-05-10 17:06:45 +02:00
Joe Netti
b87a56752c updated graphql submodule. Added new jwt-factory submodule 2019-05-10 17:06:45 +02:00
Henrik Jonsson
023da9c36b prometheus: Fix channel_id name and prevent crashing
With c-lightning v0.7.0, there seems to be no `short_channel_id`
key present in the input sent to the `prometheus.py` script when
it is is called via the `plugin` config value for c-lightning
when a channel is opened.

Without this change, the script throws `500 Internal Server` error
when doing `$ lightning-cli fundchannel <id> <sats>`.

A sample JSON messages passed to the plugin is:

```
{
        'state': 'CHANNELD_AWAITING_LOCKIN',
        'scratch_txid': '120ad265b66aa0c4bbb5ff50a23ca85463337fb8b58b395f3811918610686a734',
        'owner': 'lightning_channeld',
        'channel_id': 'eda784df73aa105d728a0d9fee6ff450eeeac78aa57d3218f7b0dd89b2bd20f1',
        'funding_txid': 'f120bdb2eec4b0f718327dc58cc7eaee5dd46fa19f0d8a725d10ff73df84a7ed',
        'private': False,
        'funding_allocation_msat': {
                '03584abd04d69168600ff0ff5d11723d324f2deadbeefcbb84804580e344af235e': 0,
                '03a9c46ddacd373f78b6679f9dec6adb10b3ddeadbeef2a685e09b2ce6101bc18c': 100000000
        },
        'funding_msat': {
                '03584abd04d69168600340ad5d11723d324f2deadbeefcbb84804580e344af235e': '0msat',
                '03a9c46ddacd373f78b6679f9dec6adb10b3ddeadbeef2a685e09b2ce6101bc18c': '100000000msat'
        },
        'msatoshi_to_us': 100000000,
        'to_us_msat': '100000000msat',
        'msatoshi_to_us_min': 100000000,
        'min_to_us_msat': '100000000msat',
        'msatoshi_to_us_max': 100000000,
        'max_to_us_msat': '100000000msat',
        'msatoshi_total': 100000000,
        'total_msat': '100000000msat',
        'dust_limit_satoshis': 546,
        'dust_limit_msat': '546000msat',
        'max_htlc_value_in_flight_msat': 18446744073709551615,
        'max_total_htlc_in_msat': '18446744073709551615msat',
        'their_channel_reserve_satoshis': 1000,
        'their_reserve_msat': 1000000msat,
        'our_channel_reserve_satoshis': 1000,
        'our_reserve_msat': '1000000msat',
        'spendable_msatoshi': 99000000,
        'spendable_msat': '99000000msat',
        'htlc_minimum_msat': 0,
        'minimum_htlc_in_msat': '0msat',
        'their_to_self_delay': 144,
        'our_to_self_delay': 144,
        'max_accepted_htlcs': 483,
        'status': ['CHANNELD_AWAITING_LOCKIN:Reconnected, and reestablished.', 'CHANNELD_AWAITING_LOCKIN:Funding needs more confirmations.'],
        'in_payments_offered': 0,
        'in_msatoshi_offered': 0,
        'in_offered_msat': '0msat',
        'in_payments_fulfilled': 0,
        'in_msatoshi_fulfilled': 0,
        'in_fulfilled_msat': '0msat',
        'out_payments_offered': 0,
        'out_msatoshi_offered': 0,
        'out_offered_msat': '0msat',
        'out_payments_fulfilled': 0,
        'out_msatoshi_fulfilled': 0,
        'out_fulfilled_msat': '0msat',
        'htlcs': []
}
```
2019-05-10 17:05:08 +02:00
Christian Decker
0ac54eecfd autoreload: Add the autoreload plugin to the README
Signed-off-by: Christian Decker <decker.christian@gmail.com>
2019-05-10 10:14:06 +02:00
Christian Decker
b526277edf autoreload: Add an autoreload plugin to restart plugins on change
A simple plugin that can be used to speed plugin development by having the
plugin under development be reloaded whenever its executable changes, or when
triggered automatically.

Signed-off-by: Christian Decker <decker.christian@gmail.com>
2019-05-10 10:14:06 +02:00
Christian Decker
54efa366e3 probe: Actually add a sensible return value to the probe method
It was returning `null` and we'd have to check the logs or the DB for the
result. This makes it just a bit easier to see what happens.

Signed-off-by: Christian Decker <decker.christian@gmail.com>
2019-05-09 12:46:30 +02:00
Michael Schmoock
b515dbe59a fix: sendinvoiceless adds receivers fee 2019-05-08 23:33:58 +02:00
Michael Schmoock
a35dfc5a5d doc: command receivedinvoiceless 2019-05-08 23:33:58 +02:00
Michael Schmoock
11ec378cfb feat: sendinvoiceless list payments
This commit will add the cli command `receivedinvoiceless`
which will show you the deteceted payments made using this method.
2019-05-08 23:33:58 +02:00
Gálli Zoltán
5416decde2 rebalance: exclude all own channels from getroute
fix for #17
2019-05-08 12:47:59 +02:00
Rene Pickhardt
4fdaaa461d enhanced the README.md file
added another community repo, a tutorial video for pypi lightning and in particular added instructions how to run and activate plugins.
2019-05-07 15:45:35 +02:00
Gálli Zoltán
c70367b231 sendinvoiceless: README.md update
- short description and link in the the top-level README.md
- mention known weaknesses
2019-05-02 13:09:35 +02:00
Gálli Zoltán
b4f1e0cab4 sendinvoiceless: workround for clightning #2601
review fix, thanks to @m-schmoock
2019-05-02 13:09:35 +02:00
Gálli Zoltán
9815483491 invoiceless payment plugin
- sends payment without an invoice from the receiving node
- uses circular payments: takes the money to the target node, pays in the form of routing fee, and brings some change back
- no plugin/update required on the receiving side
2019-05-02 13:09:35 +02:00
Michael Schmoock
799eb51528 fix: workaround for outdated pylightning versions #2601 2019-05-01 22:38:51 +02:00
Michael Schmoock
e7adbfa161 doc: update rebalance README.md 2019-05-01 22:38:51 +02:00
Michael Schmoock
5efb86da46 feat: calculate optional amount 2019-05-01 22:38:51 +02:00