1
0
mirror of https://github.com/ACINQ/eclair.git synced 2025-01-19 05:33:59 +01:00
Commit Graph

593 Commits

Author SHA1 Message Date
araspitzu
aef27d8f9c
Print stack trace when crashing during boot sequence (#949)
* Print stack trace when crashing during boot sequence

* Use friendly message when db compatibility check fails
2019-04-24 10:23:57 +02:00
Pierre-Marie Padiou
c530b23175
Added simple plugin support (#927)
Using org.clapper:classutil library and a very simple `Plugin` interface.
2019-04-19 18:10:47 +02:00
Fabrice Drouin
e2ff5c857b
Set version to 0.3-SNAPSHOT (#920)
We have enough major changes from the last release to justify switching to 0.3
2019-03-28 09:49:17 +01:00
sstone
3f72b441d8
Set version to 0.2-SNAPSHOT 2019-01-18 20:15:04 +01:00
sstone
eb0e45a8b1
set version to 0.2-beta9 2019-01-18 19:01:59 +01:00
sstone
4e0702a923
set version to 0.2-SNAPSHOT 2018-10-20 21:38:16 +02:00
sstone
52821b8664
set version to 0.2-beta8 2018-10-20 21:34:34 +02:00
sstone
b0305b0551
set version to 0.2-SNAPSHOT 2018-10-15 17:00:40 +02:00
sstone
c564f51d24
set version to 0.2-beta7 2018-10-15 16:48:13 +02:00
sstone
997aceea82
set version back to 0.2-SNAPSHOT 2018-09-26 14:05:57 +02:00
sstone
3fc5da0a7b
set version to 0.2-beta6 2018-09-26 14:04:38 +02:00
Fabrice Drouin
b07bb2a39e
Logging: use a rolling file appender (#721)
* Logging: use a rolling file appender

Use one file per day, keep 90 days of logs with a total maximum size
capped at 5 Gb

* Router: log routing broadcast in debug level only
2018-09-24 20:00:36 +02:00
Pierre-Marie Padiou
15c73273b6
Removed max body size in http client (#686)
* removed max body size in http client

This is required because since f3676c6497
we retrieve multiple full blocks in parallel.

* trivial: removed unused code

* trivial: added log

* trivial: more unused code removal
2018-08-31 15:46:41 +02:00
Chris Stewart
fe82641e92 Clean up ExecutionContext/ActorSystem (#652)
This allows for a user of the library to implicitly pass the `ActorSystem` to the eclair node. Although if you are running multiple eclair instances on the same machine you need to make sure the `ActorSystems` that are passed implicitly are unique.
2018-07-16 14:25:20 +02:00
Pierre-Marie Padiou
86e91f76fc
Added context to logs (#638)
* improved logs on sig sent/received

* put 'sent announcements' log in debug

* added logging of IN/OUT wire messages

* added mdc support to IO classes

* reduced package length to 24 chars in logs
2018-07-02 18:25:19 +02:00
sstone
cd6524e25b
set version to 0.2-SNAPSHOT 2018-06-20 09:45:09 +02:00
sstone
8aa51f4e02
set version to 0.2-beta5 2018-06-20 09:21:05 +02:00
sstone
a85ba9ceef
set version to 0.2-SNAPSHOT 2018-05-30 19:15:06 +02:00
sstone
e6fe077582
set version to 0.2-beta4 2018-05-30 19:11:44 +02:00
pm47
644b4a2a98
back to SNAPSHOT 2018-05-18 15:53:02 +02:00
pm47
1dd8aa5aab
set version to 0.2-beta3 2018-05-18 15:14:52 +02:00
Gustavo Fernandes
f983160288 Increase startup timeout (#577) (#590) 2018-05-18 11:55:53 +02:00
pm47
b5437c9bad
back to SNAPSHOT 2018-04-04 13:52:24 +02:00
pm47
7598615263
set version to 0.2-beta2 2018-04-04 13:40:03 +02:00
pm47
b2178ade30
back to SNAPSHOT 2018-03-28 21:27:55 +02:00
pm47
c39ce692f8
setting version to 0.2-beta1 2018-03-28 20:46:40 +02:00
Pierre-Marie Padiou
d38f227b42
Added copyright notice to all files (#497)
* added copyright notice to all files

* updated date in LICENSE
2018-03-21 16:29:42 +01:00
pm47
1754bf0933
back to SNAPSHOT 2018-03-16 17:05:58 +01:00
pm47
dbb4f5b467
set version to 0.2-alpha11 2018-03-15 19:41:53 +01:00
Dominique
3d48ec871e
Improved handling of timeouts in API and GUI (#484)
Both the GUI and the API should handle AskTimeoutException failures as
specific cases: GUI should ignore them, API should print a pretty
response. Increased ask timeout to 60s.

Akka http server responses with the same format as other errors.
Fixes #414 where eclair-cli would fail to parse the server
timeout response.
2018-03-15 19:33:12 +01:00
pm47
1b247ae613 back to SNAPSHOT 2018-02-16 18:10:35 +01:00
pm47
0beca13b23 set version to 0.2-alpha10 2018-02-16 17:28:01 +01:00
Pierre-Marie Padiou
b91e90783f
Replaced LoggingFSM -> FSM (#439)
And changed akka default log level from `DEBUG` to `INFO`.
2018-02-16 16:51:10 +01:00
Pierre-Marie Padiou
f3b746643d
Use TCP pull mode (#422)
We now use [akka tcp pull mode](https://doc.akka.io/docs/akka/2.5.3/scala/io-tcp.html#read-back-pressure-with-pull-mode) for both incoming and outgoing connections.

In combination with setting a relatively low value for `akka.io.tcp.max-received-message-size`, this results in less RAM consumption, in particular when validating a whole routing table.

Also improved the router:
- Removed the grouping of `channel_announcement` because batching is done lower in the stack, in the bitcoin json-rpc client. Channels are now validated as they arrive.
- Keep track of all origin peers for every announcement (instead of the first one), in order not to send back the same announcements to peers.
- Better choice of data structures, which increases constant time operation (but don't completely eliminate less efficient access)
- Reworked management of private/not-yet-announced channels
2018-02-16 15:49:34 +01:00
Dominique
0416784f08 TCPException message error should be defined (#401)
* TCPException sets a message when extending RuntimeException

If no message was set for the exception, a 'null' message was displayed to
the user when TCPException is thrown. Instead, we now display the exception class name.

This fixes #399.
2018-02-12 15:33:29 +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
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
Pierre-Marie Padiou
a3bdf52a2f
Improve logs (#320)
* always print `shortChannelId` in hex

* fixed logs in `ThrottleForwarder`

* logs the `paymentHash` when relaying an htlc

* don't print all channel data when restoring a channel

* added logs to relayer

* reduced log level in Peer

* cleaned up switchboard logs

* fixed `id`/`channelId` mixup in relayer logs

* slight changes in log levels

* do not log as warning when tx generation is simply skipped

* streamlined relayer logs

* improved router logs

* don't display errors when witness can't be parsed

* don't log connection errors as warnings

* reduce amount of logs in case of local known error

* removed reconnection message to deadletter

* try a cleaner way of displaying channel errors

* put some reconnection-related logs from info to debug

* peer: ignore `Rebroadcast` messages in `INITIALIZING`

* less verbose exception logging in channel

* display friendlier close type

* reduced default log level to INFO
2017-12-22 23:32:34 +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
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
Dominique
71f39a033b Moved akka conf to eclair-node application.conf (#252)
Overriding configuration of dependencies must be done at the application level.
2017-12-04 13:31:05 +01:00
pm47
6e37586f9e disabled debug mode in default logback.xml 2017-12-01 18:42:50 +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
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
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
Pierre-Marie Padiou
edab8b004a Use logback's MDC to display channelId in logs (#142) 2017-08-25 16:30:00 +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
Pierre-Marie Padiou
43d6c80f9e Bugfix: regression in init (#120)
Eclair wasn't stopping anymore when two instances were started with the
same ports.

Note: we should probably go one step further and put a lock in the datadir
directory. For now we just check if the main TCP port is in use and fail fast.
2017-08-23 12:13:18 +02:00
Pierre-Marie Padiou
c6dc33e8bf Bugfixes and minor improvements (#117)
* reworked payment lifecycle

* fixed retry logic (infinite loop in some cases)
* check update signature
* keep track of the list of errors and routes tried

* added support for sending bolt11 payment request in the API

* updated eclair-cli and deleted deprecated TESTING.md (closes #112)

* removed useless application.conf in eclair-node

* now handling CMD_CLOSE in shutdown/negotiating/closing states

* added no-op handlers for FundingLocked and CurrentFeeRate messages

* cleaning up stale announcements on restart

* more informative/less spam logs in Channel

* (gui) Wrapping payment events to display date of event

* Also added controls to item content in cell factory overrides. This
  should prevent prevent duplicates as reported in #115
2017-07-26 18:57:31 +02:00
sstone
905aebebbd set version back to 0.2-SNAPSHOT 2017-07-19 17:15:04 +02:00
sstone
c85823f5b4 set version to 0.2-alpha4 2017-07-19 17:12:21 +02:00
Pierre-Marie Padiou
073705a957 Implement state-counter retransmission (#105) 2017-07-17 14:28:07 +02:00
Fabrice Drouin
7427cdb27b Interpret feature bits as per rfc PR 156-169-178 (#101) 2017-07-11 17:41:14 +02:00
Pierre-Marie Padiou
582c327e04 Minor tweaks (#94)
* using scodec BitVector for interpretation of features
* datadir is now a file instead of a string
* (minor) made option mapping more explicit
2017-06-08 18:47:59 +02:00
Pierre-Marie Padiou
d86dd72d78 Separate code into modules (#91) (closes #88) 2017-06-06 18:37:34 +02:00
Pierre-Marie Padiou
7f747d55fd Added support for channel_disabled flag and updated failure codes (#90)
* added support for 'disable' flag in announcements (see lightningnetwork/lightning-rfc/pull/143)
* now responding TemporaryChannelFailure errors to CMD_ADD_HTLC in OFFLINE
* added helper methods for interpreting ChannelAnnouncement flags
* (gui) added image depicting flags of announcement in channels table
* implemented all failures as per lightningnetwork/lightning-rfc/pull/167
* router: don't use channels that have been announced as disabled
2017-06-02 20:14:21 +02:00
pm47
6297054a79 added validation checks on payment hash 2017-05-16 14:57:52 +02:00
pm47
0a597adc5a peer now keeps track of both temporary and final channel ids 2017-05-12 13:27:20 +02:00
pm47
c7b5953b64 send INPUT_RECONNECTED right away when restoring a channel and peer is already connected 2017-04-28 18:40:07 +02:00
pm47
80281bbf78 (minor) ignoring Reconnect messages when peer is a listener 2017-04-28 17:54:52 +02:00
pm47
aafa3f63a6 fixed race condition when registering tcp client listener 2017-04-28 17:54:52 +02:00
pm47
b981c67d37 now using SecureRandom instead of Random 2017-04-28 17:54:52 +02:00
pm47
2366804ff7 peer is now stopped and cleaned up upon reconnect timeout if there are no channels 2017-04-28 17:54:52 +02:00
pm47
d8e4af95fa quick and dirty fix to updates the node announcement on startup 2017-04-28 17:54:52 +02:00
pm47
6c196f8733 peer now reconnects on new/restored channels instead of relying on initial stateTimeout 2017-04-28 17:54:52 +02:00
sstone
cadf0bf4e9 use hash of block #0 as chain hash 2017-04-28 17:16:23 +02:00
Pierre-Marie Padiou
4c6f8695cb Make router not broadcast announcements back to sender (#82)
* replaced system scheduler by FSM timers
* added a basic way of not sending routing messages to origin peer when broadcasting
2017-04-28 17:03:25 +02:00
anton
cd9cf95643 Combine sigs in a more conscise way 2017-04-28 16:16:47 +02:00
dpad85
4f9b964bae Fixed type cast issue with peers rpc service (#79)
* (gui) fixed inconsistency with channel id copy
* Fixed cast issue with `peers` rpc service
* also renamed `channelIdHex` to `channelId`
2017-04-26 16:37:29 +02:00
pm47
097f51f1c5 back to SNAPSHOT 2017-04-25 18:37:26 +02:00
pm47
598c7a99ee set version to 0.2-alpha3 2017-04-25 18:04:48 +02:00
pm47
8d9ed6de8f client must die when transport dies (regression caused in 75e4923002) 2017-04-25 18:00:42 +02:00
sstone
645cb657d5 funding: remove redundant address test 2017-04-25 13:06:13 +02:00
pm47
8589294933 fixed naming inconsistencies pubkey->nodeId 2017-04-25 10:33:41 +02:00
Fabrice Drouin
14cdf8f345 BOLT4: update Sphinx to match the latest specs (#76)
* Sphinx: implement BOLT PR 145
see https://github.com/lightningnetwork/lightning-rfc/pull/145
* Sphinx: use simplified onion proposed in PR145
address and hop-payload fields have fused, and we are now routing based on channel short ids
* Updated relayer to take advantage of shortChannelId
* Sphinx: use more meaningful class names
* BOLT 4: use 32 bytes MAC in reply error packet
instead of 20
2017-04-24 15:57:13 +02:00
Fabrice Drouin
50429da0ed Wire: add chainHash field to open message (#69)
* wire: add chainHash field to open message (see https://github.com/lightningnetwork/lightning-rfc/pull/135)
* split validateParams() into "funder" and "fundee" versions (fundee also needs to check the chain hash funder sent in their open message)
2017-04-20 17:27:53 +02:00
dpad85
fe22572976 New PaymentRequest object + HTLC verification (#72)
* Added a PaymentRequest object
* A `PaymentRequest` can be serialized/deserialized with `write`/`read`
  static functions in companion
* Amount validation is handled in constructor
* `ReceivePayment` message in payment handler generates a `PaymentRequest`
* Updated tests
* HTLC succeeds if amount is equal or greater than requested amount
* If the amount paid is more than twice the amount expected, the HTLC fails
* (gui) display payment failed cause in notification
* Improved payment request validation messages
2017-04-20 17:26:30 +02:00
Fabrice Drouin
75e4923002 BOLT 4: use proper cipher stream for reply messages (#75)
* more logs on connection establishment, added initialize() to FSMs
2017-04-20 17:08:23 +02:00
Pierre-Marie Padiou
da78ae5356 Better router/channel exception handling (#71)
* added specific channel exceptions
* added specific router exceptions
* retry payment when an error occurs at the first channel
2017-04-20 11:47:38 +02:00
Anton Kumaigorodski
2eded652e5 Validity of remote final script is not checked when a Shutdown was already sent (#74)
* Superfluous mapping as we're only interested in collection sizes
* Add a shutdown with invalid final script test
2017-04-20 11:12:12 +02:00
Anton Kumaigorodski
12ca54bc90 both localCommit & remoteCommit htlcs are now checked on Shutdown (#73) 2017-04-19 16:50:01 +02:00
Fabrice Drouin
378a332954 LocalParams should not include maxFeerateMismatch (#70)
as it is not a direct protocol parameter
2017-04-12 15:17:01 +02:00
Pierre-Marie Padiou
102f76e401 Automatic reconnection (#64)
* automatically reconnect every minute (optional, enabled by default)
* (gui) removed reconnect
* use stateTimeout to send ping messages
2017-04-11 17:17:26 +02:00
pm47
7885acd4af fatal error messages are now sent to stderr in headless mode 2017-04-11 17:05:03 +02:00
dpad85
3f404025da Added a receive method to the API to generate payment requests (#63) 2017-04-11 16:47:09 +02:00
Fabrice Drouin
fd56d35073 make max-feerate-mismatch configurable and set default value to 500% (#62)
* make max-feerate-mismatch configurable and set default value to 500%
there can be a significant gap between the fee rate estimated by different bitcoin
clients (see estimatesmartfee) so we must set a reasonably high value for the threshold
above which we consider htat local and remote fee rates are too different and close the
channel.

* use difference/average to compare feerate
it becomes symmetrical and easier to reason with, and also more forgiving.

* make "UpdateFee" minimum ratio configurable
2017-04-11 16:45:03 +02:00
pm47
e2350ca8b1 added tests for state WAIT_FOR_FUNDING_PARENT 2017-04-11 16:43:38 +02:00
dpad85
9a2bdb31a1 (GUI) Added an option in the GUI to open a simple connection to a node (#68)
* (gui) added option to open a simple connection to a node in gui
* added checkbox in open channel modal window
* when the 'simple connection' checkbox is selected, the `fundingSatoshis`
  and `pushMsat` fields are ignored
* (gui) channelid is displayed as hexa
* (gui) fixed testnet color
* (gui) increased the inital size of the main window
* (gui) display the node alias in channel pane when the node is announced: alias is appended to node id; using option to open channel
2017-04-11 12:07:09 +02:00
pm47
5bcf2f4ae7 setting watches when restoring in CLOSING state 2017-04-11 10:18:12 +02:00
pm47
c94972f7ce made transport actor a FSM instead of a LoggingFSM 2017-04-11 10:11:39 +02:00
Pierre-Marie Padiou
47310c1534 Fixed racing issues in integration tests making travis fail (#61)
* integ tests: removed sleeps, waiting for watches before generating blocks
* fixed a (rarely occuring) race condition related to bulk-generation of test blocks
2017-04-10 16:58:17 +02:00