1
0
Fork 0
mirror of https://github.com/ACINQ/eclair.git synced 2025-03-13 19:37:35 +01:00
Commit graph

2220 commits

Author SHA1 Message Date
dpad85
c6c18d6469
Switch backup mailbox back to BoundedMailbox 2020-10-09 14:26:56 +02:00
pm47
96cd0e8ac2
Merge branch 'android' into android-phoenix 2020-10-09 13:36:55 +02:00
pm47
d051fa76c7
Merge commit 'ea57bb266' into android 2020-10-09 13:17:00 +02:00
pm47
648c841c0d
Merge commit 'b63c4aa5a' into android 2020-10-09 12:25:17 +02:00
pm47
fb8ae0cd59
fixup! Update android branch (#1162) 2020-10-09 11:40:20 +02:00
Bastien Teinturier
9bb992bbc9
Add DB entry for payment router error (#1513)
When using MPP, if we can't find a route, we need to add an entry to the
DB. Otherwise when users query their payment status, nothing will be
returned which is a bad UX.

Fixes #1512
2020-10-09 10:58:26 +02:00
pm47
ebed70b93c
Merge branch 'android' into android-phoenix 2020-10-09 10:56:19 +02:00
pm47
8ca798176d
Merge commit '68dfc6cb7' into android 2020-10-08 18:53:04 +02:00
pm47
2735e0f419
Merge commit 'd9f257ada' into android 2020-10-08 18:30:57 +02:00
pm47
d53b708a45
Merge branch 'android' into android-phoenix 2020-10-08 17:34:46 +02:00
Bastien Teinturier
e8bf5d1048
[OpenChannel] Use TLV for channel version (#1534)
We were previously using an encoding that was incompatible with TLV.
We keep the old format, but also understand the channel version when provided
in a TLV field.

If the old format is provided, it will be preferred.
2020-10-08 11:07:27 +02:00
dpad85
0850b084ce
Add message to unset FCM token from peer 2020-10-07 16:55:09 +02:00
pm47
d0b405fa62
special connection handling on phoenix
We always automatically reconnect, whether or not there are existing
channels.

Manual connection requests are ignored.
2020-09-30 16:06:26 +02:00
dpad85
9587a4e012
Merge branch 'hotfix/v0.3.11-android-phoenix' into android-phoenix 2020-09-21 10:48:22 +02:00
dpad85
bea1bddb56
Release v0.3.11-android-phoenix 2020-09-07 12:56:32 +02:00
dpad85
2e0ad4ea54
Fix issue with Phoenix reestablish channel type 2020-09-07 12:54:13 +02:00
dpad85
4638578ce9
Add support for FCM custom token (bit 35017)
When sending this message to a peer, the node expects the peer to
link the token with its own pubkey, and use fcm to wake him up
when needed.
2020-08-13 15:24:53 +02:00
dpad85
4280e28595
Back to development 2020-08-13 15:23:42 +02:00
pm47
7489251ffd
use db fee provider for faster startup
Instead of waiting for latest feerates from the fee provider at startup,
we use the previously stored feerates in the meantime, and proceed with
the initialization.

It makes sense because fees are asynchronous so we are "always late"
anyway.
2020-07-23 18:12:25 +02:00
pm47
e0f99f9714
Merge branch 'master' into android 2020-07-23 17:45:58 +02:00
dpad85
4a54e004ee
Update version to 0.4.0-android-SNAPSHOT 2020-07-20 14:24:29 +02:00
Fabrice Drouin
ea57bb266c
Release 0.4.1 (#1481)
* Set version to 0.4.1

* Set version to 0.4.2-SNAPSHOT
2020-07-20 12:00:01 +02:00
Pierre-Marie Padiou
65facab141
Add debug logs to transport handler (#1488) 2020-07-17 16:35:31 +02:00
Pierre-Marie Padiou
e06325e03b
fixup! Split the Peer in two (#1347) (#1487) 2020-07-17 15:09:28 +02:00
dpad85
210cf2ab46
Release v0.3.10-android-phoenix 2020-07-16 18:10:14 +02:00
dpad85
d875d88bdc
Merge branch 'android' into android-phoenix 2020-07-16 18:08:55 +02:00
dpad85
667eb2fda3
Remove manualTransition in SYNCING -> NORMAL transition
manualTransition is a fix for old akka version where onTransition events
are not fired for same state transitions. Must not be used if states are
different, otherwise duplicate events are fired.
2020-07-16 18:06:16 +02:00
dpad85
114ba2940d
Back to development 2020-07-16 17:46:22 +02:00
Bastien Teinturier
ebfca8cefd
Bitcoin Core Wallet small refactoring (#1482)
Shuffle methods around between ExtendedBitcoinClient and
BitcoinCoreWallet to help readability and separate concerns.

Add some documentation and fix harmless warnings.
Add bitcoin client tests.
2020-07-09 18:12:07 +02:00
Bastien Teinturier
adf4da623d
Handle invoices with 0 amount (#1480)
We handled empty amounts (field not specified at all) but not the case
where the amount was specified and equal to 0.

Fixes #1478
2020-07-02 12:07:05 +02:00
Pierre-Marie Padiou
d22f840e6d
Replace Travis by Github Action (#1477)
Co-authored-by: Bastien Teinturier <31281497+t-bast@users.noreply.github.com>
2020-07-02 11:02:47 +02:00
Bastien Teinturier
23b5fb9404
Fix commitments fuzz test (#1479)
We must not let feeratePerKw be 0, otherwise we trigger FeerateMismatch
errors which isn't what we want to test.
2020-07-02 10:25:23 +02:00
Bastien Teinturier
26fdc62dab
Update backup handler and add DB metrics (#1475)
* Non blocking bounded mailbox for backup handler

Akka 2.4 introduced a non-blocking unbounded mailbox.
It makes sense to upgrade the backup handler to that mailbox type.

We also add some backup-related metrics.

* Wrap DB calls to record metrics

We record the number of times each operation is executed and its
duration.
2020-07-02 09:01:45 +02:00
Pierre-Marie Padiou
ae3d396413
Remove the command buffer (#1476)
When we receive an `UpdateFulfillHtlc` from a downstream channel, it is
critical that we don't lose it because that is what allows us to pull
funds from the corresponding upstream channel(s). But this(ese) upstream
channel(s) may very well be currently OFFLINE and unable to update the
commitment right away, so we need to remember it for later. Same applies
to an `UpdateFailHtlc` (although it is less critical), because we don't
want the upstream htlc to timeout and cause a channel to force-close.

We were previously relying on a `CommandBuffer` actor, that uses a
"pending relay" database to store commands. Once the command is processed
by the target channel, it sends back an acknowledgment to the
`CommandBuffer`, which then removes the command from the database.
Unacknowledged commands are replayed at each reconnection or app restart.
This works well, but the flow is a little cumbersome and not easy to
understand.

With this PR, the sender (channel, payment handler, ...) is responsible for
storing commands to the pending relay db, instead of the command buffer,
which is completely removed. The target channel will acknowledge the
message and remove it from the pending relay db.

In the end, the logic is the same as before, we have just dropped the
intermediate `CommandBuffer`.
2020-07-01 16:41:27 +02:00
rorp
b63c4aa5a4
Postgresql support (#1249)
Add beta support for PostgreSQL database backend.
2020-07-01 14:52:36 +02:00
Bastien Teinturier
68dfc6cb7c
Rework feerate mismatch (#1473)
* Split feerate mismatch configuration

We want to be much stricter with feerates that are below our estimation
than feerates that are above it.

This also makes this configuration parameter easier to understand
for end users.

* Tolerate feerate mismatch while channel is unused

We can relax the conditions where we close a channel because of a feerate
mismatch: when the channel has no pending HTLCs, it's ok to temporarily
disagree on the feerate.

While we disagree on feerates, we don't use this channel to offer outgoing
HTLCs. If we receive an incoming HTLC, we have to close the channel because
that HTLC would be at risk (incorrect feerate).

This mechanism gives us time to adapt to feerate changes, hopefully reducing
the amount of unnecessary channel closures.
2020-07-01 14:45:05 +02:00
Bastien Teinturier
7ec3ba829a
Fix channelstats (for real?) (#1470)
The channelstats API only returns results for the *outgoing* channels
used when relaying. We must also include the *incoming* channels, otherwise
it looks like they're inactive which doesn't reflect their real usage.

Fixes #1465
2020-06-30 17:11:04 +02:00
Fabrice Drouin
5a83d2f8de
Fix transaction fee test (#1454)
- Test was not executed (because the "tests" variable was an iterator that was emptied by the call to .size())
- HTLC regex had to be updated to skip over the HTLC number that was added to the reference test vectors
2020-06-26 10:25:24 +02:00
dpad85
cad7b559e0
Release v0.3.9-android-phoenix 2020-06-24 16:52:21 +02:00
Pierre-Marie Padiou
85163cb356
Add context logging to route request (#1469) 2020-06-24 11:54:08 +02:00
Bastien Teinturier
6d9dbb8612
Onion payload and HTLC in-flight metrics (#1464)
* Add metric to track onion payload format

This will be useful to decide when we can safely phase out support for
the legacy format.

* Add metric to track htlcs in flight

We track both the number of HTLCs and their amounts.
We track this at the channel level and globally.
2020-06-24 11:30:04 +02:00
Bastien Teinturier
0619b202e5
Clarify trampoline route not found error (#1455)
If all trampoline retries fail, we should convert the error to a route
not found. We tried multiple fee targets and none of those was enough to
allow the trampoline node to find a satisfying route.
2020-06-23 15:52:31 +02:00
Bastien Teinturier
0563d6d6ce
Update allnodes API (#1468)
Rename to `nodes`.
Allow filtering for specific `nodeId`s.

Fixes #1460
2020-06-23 15:28:48 +02:00
Bastien Teinturier
88cb24dc81
Routing hints balance (#1443)
* Ignore routing hints for our own channels
* Update graph when private channel balance changes
2020-06-23 15:23:39 +02:00
Bastien Teinturier
365d0916df
More aggressive channel exclusion (#1441)
* Exclude channels in last payment attempt
* Exclude disabled routing hints
2020-06-23 15:14:11 +02:00
Bastien Teinturier
4199128965
MPP preimage received event (#1445)
MPP lifecycle shares preimage as soon as received.

This allows removing the use of the node-relayer as a passthrough for
fulfills, it can now simply listen to this event.

Long term, this could be sent to the event stream to share with more actors.
2020-06-23 14:57:28 +02:00
pm47
fd1d4c67e4
fixup! make phoenix resist to multi device 2020-06-23 13:59:00 +02:00
Bastien Teinturier
d9f257ada3
Multipart FSM v2 (#1439)
* PaymentLifecycle cleanup

Remove temporary hooks added for first version of MPP (route prefix,
empty routes, etc).

Allow specifying the whole route (not only nodeIds) in SendPaymentToRoute.

* Rework MultiPartPaymentLifecycle

Use the Router's new MPP RouteRequest.
Remove the "blind" split based on channel balances.
Reactivate trampoline relay to MPP non-trampoline recipient.

* Add MPP payment metrics

* Activate MPP feature by default
2020-06-23 11:44:11 +02:00
Dominique
928d47cd84
Add a fee provider saving feerates to database (#1450)
This provider will save the feerates retrieved by another provider to 
database.

This feature can be used to retrieve the last used feerates when starting 
the node, which will save time. This can have a significant effect on nodes 
running with a slow connection (e.g. mobile devices).

Note that this commit does not affect the current setup and does not
actually create the database, the feature must be implemented separately.

Fixes #1447
2020-06-22 18:31:45 +02:00
Pierre-Marie Padiou
6c81f95644
Use length-delimited byte-aligned codecs (#1442)
Legacy codecs are isolated in a separate file, with a visibility restricted to "package" in order to reduce the risk of using those codecs. Also codecs are restricted to `decodeOnly` for the same reason.
2020-06-22 18:03:08 +02:00