Commit Graph

274 Commits

Author SHA1 Message Date
Antoine Poinsot
3617674dc4 feeadjuster: fuzz update trigger treshold, add hysterisis
Signed-off-by: Antoine Poinsot <darosior@protonmail.com>
2020-10-21 16:06:40 +02:00
Antoine Poinsot
26c25fc8ee feeadjuster: unparallelize
Signed-off-by: Antoine Poinsot <darosior@protonmail.com>
2020-10-21 16:06:40 +02:00
Antoine Poinsot
2cb082d878 feeadjuster: test fee adjustment
Signed-off-by: Antoine Poinsot <darosior@protonmail.com>
2020-10-21 16:06:40 +02:00
Antoine Poinsot
d80b30579e feeadjuster: only update fees on substantial unbalancing
5% is a rather conservative value

Signed-off-by: Antoine Poinsot <darosior@protonmail.com>
2020-10-21 16:06:40 +02:00
Antoine Poinsot
4e5b26dd1e feeadjuster: always update the configuration's base and ppm fees
This avoids exponentially updating them by only multiplying constants.

Signed-off-by: Antoine Poinsot <darosior@protonmail.com>
2020-10-21 16:06:40 +02:00
Antoine Poinsot
a86ef381e7 feeadjuster: a plugin to adjust fees depending on balancing
Signed-off-by: Antoine Poinsot <darosior@protonmail.com>
2020-10-21 16:06:40 +02:00
Moller40
2464c328a2 autopilot: Improve calculation of available funds
Deduct the funds that are awaiting lockin and can't be used.
2020-10-20 12:45:35 +02:00
Moller40
de1cd7314f autopilot: Avoid "ZeroDivisionError: float division by zero"
Adding checks that prevents num_channels to be zero (or negative)
and by that avoiding zero division error.
2020-10-20 12:45:35 +02:00
Antoine Poinsot
89a4fa3f59 jitrebalance: handle the failure of the scid lookup in our peers
Somehow, it happened:
```
**BROKEN** lightningd: Plugin for htlc_accepted returned non-result response {"jsonrpc": "2.0", "id": 23, "error": {"code": -32600, "message": "Error while processing htlc_accepted: 'NoneType' object is not subscriptable", "traceback": "Traceback (most recent call last):\n  File \"/home/lightningd/.local/lib/python3.8/site-packages/pyln/client/plugin.py\", line 440, in _dispatch_request\n    result = self._exec_func(method.func, request)\n  File \"/home/lightningd/.local/lib/python3.8/site-packages/pyln/client/plugin.py\", line 427, in _exec_func\n    return func(*ba.args, **ba.kwargs)\n  File \"/home/lightningd/.lightning/plugins/jitrebalance/jitrebalance.py\", line 172, in on_htlc_accepted\n    if not peer['connected'] or chan['state'] != \"CHANNELD_NORMAL\":\nTypeError: 'NoneType' object is not subscriptable\n"}
```

Signed-off-by: Antoine Poinsot <darosior@protonmail.com>
2020-10-15 19:35:43 +02:00
Michael Schmoock
08f3da8706 drain: fix test for clnd with exp features 2020-09-19 17:00:19 +02:00
Christian Decker
ef4c1bf1e8 readme: Add the Boltz Channel Creation Plugin 2020-09-04 16:29:27 +02:00
Antoine Poinsot
550cd2522a sauron: handle testnet API unreliability
Signed-off-by: Antoine Poinsot <darosior@protonmail.com>
2020-08-30 10:48:01 +02:00
Christian Decker
f108a0580c travis: Reduce build parallelism 2020-08-29 19:43:19 +02:00
Christian Decker
746513bf5a helpme: Verify that the caller has specified an invoice
Reported-by: Sebastian Falbesoner <@theStack>
Fixes #107
2020-08-29 14:54:40 +02:00
Christian Decker
acdf3fb356 readme: Added two new plugins by @rbndg
Suggested-by: Reza <@rbndg>
2020-08-29 14:54:24 +02:00
Christian Decker
9f3ac44a77 prometheus: Change default port to 9750 as per port-allocation
We registered port 9750 the [port allocation] list for the prometheus project,
so we should use that port :-)

Suggested-by: Martin Milata <@mmilata>

[port allocation]: https://github.com/prometheus/prometheus/wiki/Default-port-allocations
2020-08-29 14:36:03 +02:00
Christian Decker
581a2fd568 drain: Disable test_setbalance if EXPERIMENTAL_FEATURES=1
Amounts seem not to match anymore, need to look into it.
2020-08-28 23:06:30 +02:00
Christian Decker
d029ccfd42 travis: Rerun failed tests to avoid flaking out 2020-08-28 23:06:30 +02:00
Christian Decker
40e2df377a travis: Giving up on coverage... 2020-08-28 23:06:30 +02:00
Christian Decker
7ea33d2497 travis: Bump bitcoind to v0.20.1 2020-08-28 23:06:30 +02:00
Christian Decker
c908a29d08 travis: Reorder configurations to run DEVELOPER=1 first
The others are slower, and I like having quick feedback.
2020-08-28 23:06:30 +02:00
Christian Decker
9512a9cdd7 travis: Use stripped bitcoind tarball and parametrize version 2020-08-28 23:06:30 +02:00
Christian Decker
12fdd14b7a pytest: Get coverage inside and outside plugins working 2020-08-28 23:06:30 +02:00
Christian Decker
f43414d77b travis: Increase testing parallelism 2020-08-28 23:06:30 +02:00
Christian Decker
b9a8622422 backup: Remove temporary node_factory shim
This was required in order to avoid cleaning the datadir on creation.
2020-08-28 23:06:30 +02:00
Christian Decker
3b0d7a0dec travis: Make sure we always use the master pyln modules
We want to catch upcoming incompatibilities early, even if a plugin lists an
old version.
2020-08-28 23:06:30 +02:00
Christian Decker
aaa49b34f7 travis: Annotate envvars when uploading coverage report 2020-08-28 23:06:30 +02:00
Christian Decker
fd0e492e2f travis: Force coverage files to be written in the working dir 2020-08-28 23:06:30 +02:00
Christian Decker
cfc6a8b33e travis: Add some coverage cleanup and management 2020-08-28 23:06:30 +02:00
Christian Decker
e33ff5e062 sauron: Add retry HTTP adapter to retry requests up to 10 times 2020-08-28 15:50:21 +02:00
fiatjaf
8703798a37 add trustedcoin, sparko and webhook to the main list. 2020-08-28 15:49:00 +02:00
Antoine Poinsot
cb2fc61fe2 sauron: fix pip requirements..
Fixes https://github.com/lightningd/plugins/issues/126

Signed-off-by: Antoine Poinsot <darosior@protonmail.com>
2020-08-28 15:44:59 +02:00
Michael Schmoock
158a15110f summary: fix persistent peerstate zero leading window 2020-08-03 11:37:10 +02:00
Michael Schmoock
f4e3383ed6 summary: persist peerstate via shelve 2020-08-02 19:07:40 +02:00
Michael Schmoock
acf670b782 summary: adds Channel named tuple 2020-08-01 17:03:41 +02:00
Michael Schmoock
42c3041a4c fix: missing link in README 2020-08-01 17:03:41 +02:00
Michael Schmoock
75700ddc57 summary: remove legacy code 2020-08-01 17:03:41 +02:00
Michael Schmoock
294dc5dc20 summary: increase test coverage 2020-08-01 17:03:41 +02:00
Michael Schmoock
5a6489c3ae summary: moves availability code and adds testcases
extracts the availability calculations to own testable module
2020-08-01 17:03:41 +02:00
Michael Schmoock
01b075117f summary: set thread loglevel to just warn
using level error caused the testframework to fail on non-essential
price or availability thread log messages.

likely caused by the test runner not being able to query the bitstamp
API.
2020-08-01 17:03:41 +02:00
Michael Schmoock
14ad827fb8 summary: adds 72hr availability measurement
this applies a 72hr exponential smoothed sliding window to
the online/offline availability state of a peer.
2020-08-01 17:03:41 +02:00
Michael Schmoock
e484db385a summary: fix broken price API and other bugs
1. bitcoinaverage does not supply public prices since a while now:
>  Unauthenticated requests are not allowed. Take out a new plan or start
>   a free trial at https://pro.bitcoinaverage.com"
This commit fixes this by porting to bitstamp public ticker API.

2. This commit fixes the missing thread loop, so the price is
   actually updated after a while.

3. This commit fixes an unchecked attribute access that crashed during
   my tests.
2020-08-01 17:03:41 +02:00
Christian Decker
ded4f6b380 Update README.md 2020-07-03 11:42:19 +02:00
Antoine Poinsot
bd1459ab4e sauron: add Tor proxy support
Signed-off-by: Antoine Poinsot <darosior@protonmail.com>
2020-06-11 15:36:40 +02:00
svewa
04662336fa don't fund channels with more than 16777215sat, don't require confs on UTXOs to fund a channel 2020-06-11 13:17:34 +02:00
Michael Schmoock
6de448358a drain: refine tests 2020-06-11 13:16:01 +02:00
Michael Schmoock
0b685b45ea drain: fix a negative msat amount edgecase 2020-06-11 13:16:01 +02:00
Michael Schmoock
395577ec66 drain: utils - adds get_theirs helper 2020-06-11 13:16:01 +02:00
Michael Schmoock
4cb12a41cd rebalance: reduce some log output to debug 2020-06-11 13:16:01 +02:00
Michael Schmoock
30463bf169 drain: reduce some log output to debug 2020-06-11 13:16:01 +02:00