Commit Graph

746 Commits

Author SHA1 Message Date
Michael Schmoock
aa0efca2bc autopilot: return messages on run_once 2021-09-01 14:22:11 +02:00
Michael Schmoock
967ff12ca0 autopilot: nits and missing docstrings 2021-09-01 14:22:11 +02:00
Michael Schmoock
4dffeaa719 autopilot: fix broken requirements for python 3.9
the old networkx version 2.3 did try to use `fractions.gcd()` which was
deprecated already and is removed for python 3.9. pulling in networkx
version 2.4 works with python 3.9 while also with the code of this
plugin.
2021-09-01 14:22:11 +02:00
Michael Schmoock
1c7b0bb4f4 autopilot: remove support for 0.7.2 clighting
This is required becasue current `lightningd` will not start
when using a non-dynamic plugin.

Since clighting version 0.7.2 is very old, we can safely remove this
code.
2021-09-01 14:22:11 +02:00
bit0fun
9d3cf96358 autopilot: Move initialization into a separate thread 2021-09-01 14:22:11 +02:00
Rusty Russell
1612447c09 datastore: don't fail upgrade test if lightningd has real datastore.
Reported-by: @cdecker
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2021-08-30 07:31:33 +02:00
Michael Schmoock
125b2c650d feeadjuster: feature to adjust a specific channel
This adds an optional paramter to the `feeadjust` method which is `scid`
that will, if set, only adjust one channel. Default remains None which
will adjust all channels.
2021-08-29 13:44:13 +02:00
Rusty Russell
d7bfc2204d datastore: fix emptying of store into upgraded node.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2021-08-25 18:10:40 +02:00
Rusty Russell
eac6b087da datastore: apply feedback from Christian Decker
And fix missing blank line (makes flake8 a bit happier).

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2021-08-25 18:10:40 +02:00
Rusty Russell
0b9e6c9517 datastore: change keys into an array.
We store this internally as hex, since shelve insists on string keys.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2021-08-25 18:10:40 +02:00
Rusty Russell
2ec769e05b datastore.py: update to meet new datastore builtin PR.
The new datastore PR now has a generation count; this passes
the tests against that now.

Also copies tests from c-lightning, and adds ugprade test.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2021-08-25 18:10:40 +02:00
Michael Schmoock
941c1b7141 rebalance: nits 2021-08-22 23:16:51 +02:00
Gálli Zoltán
88bb8beacf rebalance: division by zero fix
this occurs if I don't have any transaction forward for a day
2021-08-19 10:07:28 +02:00
LightningHelper
0b400559f9 Add backup plugin to the table 2021-08-18 14:29:26 +02:00
LightningHelper
3da5778dcf explain that plugin can also be added to the config 2021-08-18 14:26:52 +02:00
LightningHelper
bfd80ada80 added instruction to stop the node before running the plugin
As instructed here:
https://github.com/ElementsProject/lightning/blob/master/doc/BACKUP.md#backup-plugin-and-remote-nfs-mount
2021-08-18 14:26:28 +02:00
Simon Vrouwe
44cf6ecaea backup: optimize restore and backup-compact
fix comments and typos, enable the `restore` progress bar
2021-08-18 14:26:00 +02:00
Michael Schmoock
1f968b247c feeadjuster: disable dynamic base fee scaling
This disables scaling of the base fee based on channel distortion and
instead always sets global config base fee.

The rationale behind this is that the base fee is meant to cover the
'fixed risk' of accepting an HTLC. In reality the risk may vary,
but this is unrelated on channel balance distortion but other factors.

We can have dynamic base fee per channel if we implent a better way
of competing and cost/risk coverage for this value.
2021-08-18 10:54:26 +02:00
Michael Schmoock
9d70293c44 rebalance: add average_forward_fee_ppm for 1s 7d and 30d interval to report 2021-08-16 15:50:46 +02:00
Rusty Russell
1f6f701bf1 datastore: plugin to replicate datastore commands before next release.
See https://github.com/ElementsProject/lightning/pull/4674
(I manually tested that it passes all the tests there, too!)

When they finally upgrade the node, this automatically puts any
datastore data into the inbuilt datastore and shuts down.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2021-07-25 10:56:40 +09:30
Michael Schmoock
424770449a jitrebalance: fix missing payment_secret for sendpay 2021-07-23 17:04:14 +02:00
Rusty Russell
87c9f56f75 jitrebalance: fix test for latest c-lightning which required payment_secret
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2021-07-23 22:03:27 +09:30
Rusty Russell
ca375ad367 feeadjuster: fix test for latest c-lightning which required payment_secret
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2021-07-23 22:03:27 +09:30
Rusty Russell
76b16a60b3 drain: fix for latest lightningd which require payment_secret.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2021-07-23 22:03:27 +09:30
Rusty Russell
a6e8a10618 rebalance: fix for next release.
We now insist on payment_secret, so rebalance fails!

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2021-07-23 22:03:27 +09:30
guibressan
3aa58770bd drain: README.md correction 2021-07-23 11:42:37 +02:00
Billy Garrison
c06f898316 rebalance: fix example usage in readme
The parameters were in incorrect order, causing an error when user doesn't use with `-k`
2021-07-23 10:35:19 +02:00
Wladimir J. van der Laan
43fc3c6d34 backup: Implement automatic reconnect in socket backend
Add automatic reconnect (with exponential back-off) to the socket backend.

If the connection is lost while pusing a change, try to reconnect.
Handle edge-cases that might come up depending on when the disconnect
happaned.

Currently the parameters are hardcoded: it will retry 5 times,
on the first retry it will wait 5 seconds before reconnecting.
There is an exponential backoff of 1.5, so on the fifth try it
will wait about 25 seconds.

This is particularly useful when conencting over Tor, as transient
interruptions are fairly common there.
2021-07-23 17:44:38 +09:30
Michael Schmoock
9fdc57c3a2 drain: fix a broken log statement expansion 2021-06-30 13:01:52 +02:00
Michael Schmoock
85b8b440bb drain: a comment about necessary code duplication 2021-06-29 10:43:56 +02:00
Michael Schmoock
a83ec975ba summary: remove code duplication wait_for from pyln.testing.utils 2021-06-29 10:43:56 +02:00
Michael Schmoock
4c0e3aba67 rebalance: test for additional stop msg 2021-06-29 10:42:16 +02:00
Michael Schmoock
70d0977371 rebalance: return last rebalanceall_msg even when nothing was stopped
When the last `rebalanceall` run terminated silently in the background,
it is still useful to get the ending message of that run.

This change will make the `rebalancestop` method to return the same
'nothing to stop' message plus the rebalanceall_msg when there
was a `rebalanceall` somewhere in the past.
2021-06-29 10:42:16 +02:00
Michael Schmoock
ed98e657c1 rebalance: nits 2021-06-29 10:42:16 +02:00
Michael Schmoock
e7f2dbb606 feeadjuster: use listchannels by destination dynamically 2021-06-25 16:31:22 +02:00
Michael Schmoock
1d81d70fa4 feeadjuster: logs fee_strategy on startup 2021-06-25 16:31:22 +02:00
Michael Schmoock
0062e92011 summary: fix another flake
This will make the test to wait for one node to see that the second node
disconnected after using .stop().

For that it adds wait_for(lambda) testing utils method.
2021-06-25 13:34:58 +02:00
Michael Schmoock
321e5cecf1 monitor: fix flakyness
Sometimes a channels funding allocation was not yet readable
via listpeers which is why this plugin test was flaky.

Also makes use of funding_msat instead of deprecated fields.
2021-06-25 12:51:25 +02:00
Vincenzo Palazzo
5f3bb380cd Adding Java API to the list, and another bitcoin backend
The bitcoin backend plugin is inspired by #112 #214

Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
2021-06-25 11:52:50 +02:00
Michael Schmoock
5475f256ed summary: nits 2021-06-24 14:19:55 +02:00
Michael Schmoock
2afe310a6e summary: makes test_summary_persist more precise 2021-06-24 14:19:55 +02:00
Michael Schmoock
37022fbc15 summary: logs summary.dat shelve usage 2021-06-24 14:19:55 +02:00
Michael Schmoock
b862247e2b summary: logs PeerThred activity to debug
This will eliminate a potential flakyness of the tests
because we can use that log as a marker to wait for the PeerThread.
2021-06-24 14:19:55 +02:00
Zoltán Gálli
5f0fce5820 rebalance: measure liquidity health (#257)
rebalance: measure liquidity health
2021-06-24 11:42:58 +02:00
Michael Schmoock
a2c58e647d feeadjuster: adds switchable per channel fee strategy 2021-06-23 20:00:11 +02:00
Michael Schmoock
445bca51cb feeadjuster: simplified get_chan 2021-06-23 20:00:11 +02:00
Michael Schmoock
2074eeb30d feeadjuster: use listpeers to get local fees
Using gossip is not reliable and having fees in `listpeers` is
supported in `lightningd` since 0.9.3 (Jan 21).
2021-06-23 20:00:11 +02:00
Michael Schmoock
3e56d4d4d3 feeadjuster: cleanups 2021-06-23 20:00:11 +02:00
Christian Decker
6a3a90ae08 noise: Disable flaky test 2021-06-22 19:18:13 +02:00
Christian Decker
5add7e54b2 request: Fixup requirement to fix serializer issue 2021-06-22 19:18:13 +02:00