1
0
Fork 0
mirror of https://github.com/ACINQ/eclair.git synced 2025-02-23 14:40:34 +01:00
Commit graph

35 commits

Author SHA1 Message Date
practicalswift
7a6fa8a619 Fix typos (#417) 2018-01-29 18:42:07 +01:00
pm47
56ef710f06 back to SNAPSHOT 2018-01-23 19:11:06 +01:00
pm47
951bcc4750 set version to 0.2-alpha9 2018-01-23 15:29:21 +01:00
Dominique
af7d7b164a Various GUI Improvements (#396)
* (gui) Added funding tx id to channel panel

fixes #335

* (gui) close channel button hidden when CLOSING or CLOSED

fixes #332

* (gui) User can define a preferred display unit

On startup FxApp reads the configuration from `eclair.conf` and sets
a unit to which all the amounts in the UI must be converted.

This unit is a CoinUnit object. Only `sat`, `mbtc` and `btc` are accepted.
`msat` is not accepted because it's an internal accounting unit which
should be invisible to the user. Default unit is `btc`

The gui does not expose any ui feature to update this unit at runtime.

* (gui) Notification message wraps and can now be copied

Notification message should be readable especially when an error occurs.
The message can be copied for easier issue reporting.

* Payment attempts is limited to 1

* (gui) consistent order in status bar contextual actions

* (gui) fixed unit parsing

* (gui) added menu shortcuts

fixes #347

* Revert "Payment attempts is limited to 1"

This reverts commit 1f4168aacb.

* (gui) BtcAmount are convertible to raw big decimal without loss

Fix issue where the decimal part of a BtcAmount could be lost.
Millisatoshi is now accepted as a user preferred unit.

* Set a minimum htlc amount of 1 mSat by default

By default, the node configuration should be permissive and accept low
value payments. It is up to the node admin to set up a restrictive
configuration if he needs it.

* (gui) port in node uri is optional

* (gui) added reactive errors in open channel window

* (gui) format max pr amount to user preferred unit

* (gui) Payment Request QR should be uppercased

see #375

* (gui) added a conf for the gui module

* Added eclair.gui.unit option in README
2018-01-23 15:25:53 +01:00
Anton Kumaigorodski
f1191bf325 Make payment request expiry configurable (#341)
* Make payment request expiry configurable

* Add payment request expiry to test constants

* Remove outdated unpaid requests from LocalPaymentHandler

* Add max allowed number of pending requests

* Update request pruning code in LocalPaymentHandler, replace def with lazy val in PaymentRequest

* Make payment handler return an error when we are over `max-pending-payment-requests`
2018-01-22 16:55:58 +01:00
Dominique
aa90f94304
Include payment preimage in PaymentSent event (#374)
Payment preimage is important for the sender of the payment as it proves
that he actually paid the request. It must then be available from the
`PaymentSent` event.

(gui) Payment preimage column is added to the 'payments sent' table in Activity tab
2018-01-22 16:10:17 +01:00
Dominique
6142d92cc1
Handle ipv6 addresses (#367)
* NodeURI can now handle ipv6 addresses

The address field in `NodeURI` is now a `HostAndPort` object. The reasoning is that `InetSocketAddress` is a network object and should not be directly used in an utility object. Using `HostAndPort` makes for a more readable and less bug prone code.

This especially helps with the parsing of ipv6 addresses which is more complex than ipv4. It also avoids a early lookup when the `NodeURI` object is created.

Deserialization to `NodeURI` now defaults to port 9735 if the port could not be found in the string.

fixes #343
fixes #346
2018-01-11 20:32:29 +01:00
Pierre-Marie Padiou
a1d69af597
Fixed eclair-cli (#354)
* reworked eclair-cli

* API is disabled by default, disabled CORS and require basic auth password

* better error handling

* Fixed latest version in README

* Increased connection timeout to 15s in electrum client test

* Rgb in NodeAnnouncement is now a Color object

Makes the color field more practical to handle and enable finer
serialization with a more readable code.

allnodes command in api now exports a list with node announcements.

* Added api call to list all the channels updates

This call can also filter the channels for a given nodeId

This fixes #344.
2018-01-11 19:23:17 +01:00
pm47
74faad53e8 back to SNAPSHOT 2017-12-23 19:26:54 +01:00
pm47
8edb2a478c set version to 0.2-alpha8 2017-12-23 18:37:00 +01:00
Dominique
8197747913
[gui] Various gui fixes (#327)
Fixes #318, #317, #306

* README should recommend TESTNET

* (gui) ui can parse lightning: and lightning:// schemes

* (gui) Relaxed decimal amount regex: accepts no leading int

* (gui) Added a node info modal displaying node URI as QR code

* (gui) Logging throwable when gui can not start
2017-12-22 23:26:29 +01:00
Pierre-Marie Padiou
fe5416d2df Reworked peer management (#316)
* reworked peer management

- connection and channel opening are now separated, simplified
  `switchboard`

- use a single authenticator for both incoming and outgoing connections

- `peers` api call now returns current state and channel count

* fixed last commit

* fixed last merge

* added inetsocketaddress serializer
2017-12-22 23:06:35 +01:00
Anton Kumaigorodski
63b772cf2a Assisted route handling (#279) 2017-12-20 19:14:24 +01:00
Pierre-Marie Padiou
28037ea8fe
Added more methods in API (#281)
* can use `channelId` or `shortChannelId` in API for methods `channel` and `close`

* can now list channels to a particular `nodeId` in API
2017-12-15 15:05:22 +01:00
pm47
f1afe3f4b7 back to SNAPSHOT 2017-12-14 18:22:39 +01:00
pm47
1155788b5e set version to 0.2-alpha7 2017-12-14 12:28:25 +01:00
Dominique
07f0cbeaab [GUI] Set default unit to milliBTC (#268)
* (gui) Default unit should be milliBTC

* Default unit set to MILLI_BTC

* Added tests to String amount conversion function

* Added BTC unit

* Removed milliSatoshi unit when opening a channel

* Removed redundant dependency and added a unit test
2017-12-11 19:19:55 +01:00
Dominique
559779f046 (gui) Units are now set from CoinUtils values (#261)
Fixes #260 where units could mismatch and a string amount would not be parsed
2017-12-07 18:49:03 +01:00
pm47
44f7bd7145 bcak to SNAPSHOT 2017-12-06 19:19:30 +01:00
pm47
3d240f5761 set version 0.2-alpha6 2017-12-06 18:34:40 +01:00
Nicolas Dorier
0794fb8d5a Docker support with repeatable build (#255)
Dependency to `git` has been removed, we now use `notag` when building without
a git directory.

In order to reliably fetch all dependencies, we do a first blank build
(with no source files), then we copy the sources and do a real commit.

This is a simpler and more robust approach.

Also, fixed the .dockerignore to filter out IDE files.
2017-12-05 17:29:47 +01:00
pm47
1c7f66bf5b updated plugin versions 2017-12-03 18:05:47 +01:00
Dominique
44e7c3ba31 Handling optional amount in a Payment Request (#241)
* Enable generation of a payment request without amount

The amount field in a `PaymentRequest` was already optional but eclair
did not permit the generation of such a request.

Added a new `receive` service with no required amount field.

In the GUI, the parsing of the amount field and its conversion to
`MilliSatoshi` are reworked to better handle decimals.

* (gui) Amount's can be overriden when sending a payment request

The amount of a payment request can be changed and it is up to the
receiving node to accept or deny the payment according to its
implementation.

This also enables the user to pay through the GUI a payment request
where the amount has not been set, such as a donation. The amount is still
required!

The description field has also been added in the GUI. It is empty if the
description has not been set.

* (gui) Properly parse amounts from open channel form

* (gui) added optional `lightning:` scheme to payment request
2017-11-30 15:55:29 +01:00
Pierre-Marie Padiou
ffc4172e70
Added more checks on open/accept messages (#240)
We check that channel parameters are compliant with [BOLT 2](https://github.com/lightningnetwork/lightning-rfc/blob/master/02-peer-protocol.md) (this fixes #236).

We make sure that the counterparty chooses a decent `dust_limit`
because we want them to be able to publish their commitment, e.g. in a
data loss scenario. We also make sure that our configurable `dust_limit` isn't too low (this
fixes #234).

Also fixed our min `dust_limit` (542->546).

GUI:
* Using funding constants from `Channel`
* Also fixed an issue here `push` amount was compared to the max funding amount
  instead of the actual `funding` amount
2017-11-29 18:18:09 +01:00
Pierre-Marie Padiou
bfa3e1c2ca Reformat + optimized imports (#222)
* Reformat + optimized imports

* Fixed unwanted modifications
2017-11-21 20:08:15 +01:00
Pierre-Marie Padiou
875dc04d39
Support for electrumx API (#208)
This is a rework of #184 with numerous improvements and bugfixes.

* re-enabled `WatchSpentBasic`

* fixed several issues in watcher

* fixed pattern matching for INPUT_RECONNECTED event in CLOSING

* reduced logback_colors log level

* connect txes even if they arrive out of order

* wallet: send confidence event as soon as a tx is confirmed

* fixed 5985148f2f and improve events

* added `NewWalletReceiveAddress` event

* cleaned up electrum testnet seeds

* added a test on dumping routing state

* removed WAIT_FOR_FUNDING_PUBLISHED state and clarified funding tx publish assumptions

* wallet: use BIP49 derivation and 24 words mnemonic codes
we use segwit with p2sh-of-p2wkh so we should use BIP49 derivation
instead of BIP44 (same path with m/49'/... instead of m/44'/...)

* added a rollback function to `EclairWallet`

This rollback is called whenever we know we won't publish the funding tx,
so that we tell the wallet to release locks on utxos.

* fundee now checks feerates at `open_channel` reception

* proper handling of electrum connection/disconnection

* moved bitcoinj test to its own package

* make electrum wallet advertise address at startup

* set version to 0.2-SNAPSHOT
2017-11-21 18:12:45 +01:00
Pierre-Marie Padiou
f71f3da027
Rework preimage handling (#183)
* properly handle new htlc requests when closing

When in NORMAL state and a `shutdown` message has already been
sent or received, then any subsequent `CMD_ADD_HTLC` fails and
the relayer is notified of the failure.

Same in SHUTDOWN state.

This fixes a possible race condition when a channel just switched
to SHUTDOWN, and the relayer keeps sending it new htlcs before
being notified of the state change.

* renamed Htlc->DirectedHtlc + cleanup

* storing origin of htlcs in the channel state

Currently this information is handled in the relayer, which is not
persisted. As a consequence, if eclair is shut down and there are
pending (signed) incoming htlcs, those will always expire (time out
and fail) even if the corresponding outgoing htlc is fulfilled, because
we lose the lookup table (the relayer's `bindings` map).

Storing the origin in the channel (as opposed to persisting the state
of the relayer) makes sense because we want to store the origin if and
only if an outgoing htlc was successfully sent and signed in a channel.

It is also probably more performant because we only need to do one disk
operation (which we have to do at signing anyway) instead of two
distinct operations.

* removed bindings from relayer

Instead, we rely on the origin stored in the actor state.

* preimages are now persisted and acknowledged

Upon reception of an `UpdateFulfillHtlc`, the relayer forwards it
immediately to the origin channel, *and* it stores the preimage in
a `PreimagesDb`.

When the origin channel has irrevocably committed the fulfill in a
`CommitSig`, it sends an `AckFulfillCmd` back to the relayer, which
will then remove the preimage from its database.

In addition to that, the relayer will re-send all pending fulfills
when it is notified that a channel reaches NORMAL, SHUTDOWN, or
CLOSING state. That way we make sure that the origin channel will
always get the fulfill eventually, even if it currently OFFLINE for
example. This fixes #146.

Also, the relayer now relies on the register to forward messages to
channels based on `channelId` or `shortChannelId`. This simplifies
the relayer but adds one hop when forwarding messages.

* modified `PaymentRelayed` event

Replaced `amountIn` and `feesEarned` by more explicit `amountIn`
and `amountOut`. `feesEarned` are simply the difference.

TODO:
- when local/remote closing a channel, we currently do not wait
for htlc-related transactions, we consider the channel CLOSED when
the commitment transactions has been buried deeply enough; this is
wrong because it wouldn't let us time to extract payment preimages
in certain cases
2017-11-14 17:21:02 +01:00
Fabrice Drouin
02683dfb43 Use min_final_cltv_expiry included in payment request (if any) (#210) 2017-11-10 19:45:41 +01:00
Fabrice Drouin
1f336772b2 back to 0.2-SNAPHOT (#166)
use scala plugin 3.3.1 (mvn scala:console now works)
add Dominique to the list of developpers
2017-09-20 15:16:49 +02:00
pm47
a97fa39fef set version to 0.2-alpha5 2017-09-14 18:41:01 +02:00
dpad85
c24b9f0c22 (gui) Remove the millisatoshis part from milli-bitcoin amounts (#153)
* (gui) Added localized decimal patterns for amounts
* balance and capacity in channel pane are formatted with the milliBTC pattern
* (gui) using vm default locale is fine with DecimalFormat
2017-09-07 17:27:48 +02:00
Pierre-Marie Padiou
c94cb13dd3 Add an experimental SPV mode with bitcoinj (#152) 2017-09-07 17:20:36 +02:00
Fabrice Drouin
a066e0d042 Switch to java environment variables instead of command line options (#149)
* added an eclair.printToconsole is defined log to stdout
* datadir is now eclair.datadir if defined, or user.home/.eclair
* update README.md
2017-08-30 13:42:58 +02:00
dpad85
45a3993e7a Added a compatibility check with DB files when booting application (#148) 2017-08-28 16:37:44 +02:00
dpad85
305420bd37 Renamed javafx module to eclair-node-gui and updated binaries name (#137)
* Renamed eclair-node-javafx module to eclair-node-gui

* (build) javafx installer uses project version

* (build) Streamlined capsule names

* (build) mvn generates installer only with `installer` profile. The windows installer does not need to be created in common cases. Decreases `eclair-node-gui` module building time by ~ 1 min

* (readme) updated the `run eclair` commands with the new capsule names
2017-08-23 19:28:18 +02:00