1
0
mirror of https://github.com/ACINQ/eclair.git synced 2024-11-20 02:27:32 +01:00
Commit Graph

110 Commits

Author SHA1 Message Date
araspitzu
8b64e238f2
Allow users to have multiple wallets in bitcoind (#1334)
* Change the bitcoind RPC URL to use the default wallet named ""
2020-03-09 10:32:52 +01:00
araspitzu
f978cfb75d
Avoid illegal reflective operation during startup (#1313)
* Rework plugin loading:

 We now require the plugin to supply a manifest entry for the "Main-Class" attribute, this is used to load the plugin without doing illegal reflection operations. We also get rid of the dependency org.clapper.classutil
2020-02-28 18:29:54 +01:00
araspitzu
a0286458c6
Rework packaging (#1307)
* Replace maven-capsule-plugin with maven-assembly-plugin in eclair-node and eclair-node-gui:
 The new packaging produces a zip file containing a launcher script and all the artifacts and dependencies in lib/.

* Add bash launcher scripts for eclair-node and eclair-node-gui, inspired by https://github.com/sbt/sbt-native-packager/blob/master/src/main/resources/com/typesafe/sbt/packager/archetypes/scripts/bash-template

* Add windows launcher scripts, inspired by https://github.com/sbt/sbt-native-packager/blob/master/src/main/resources/com/typesafe/sbt/packager/archetypes/scripts/bat-template

* Add option to start kanela agent with eclair-node launcher scripts

* Force unix file ending in launcher scripts

* Add eclair-cli in the bin folder of packaged eclair-node and eclair-node-gui
2020-02-24 15:42:26 +01:00
Dave Scotese
c8dc9e7337 Provide solution to "non-segwit UTXO found." (#1256)
The term "non-segwit UTXOs" appears in the error message that results from having such outputs in your bitcoin core wallet, and now the readme contains that same term and the solution to make troubleshooting easier.
2020-01-21 09:45:14 +01:00
Pierre-Marie Padiou
8ee53bc97d
Drop support for Java 8 (#1135)
We already have Java 7 (for Android) and Java 11. Supporting Java 8
would require crossbuilding, which we are not doing (two recent PRs
broke the build on Java 8).
2019-09-16 11:04:10 +02:00
Bastien Teinturier
b9698f2230
Documentation update (#1092)
* Fix README style warnings
* Add documentation links to the wiki
* Update build instructions.
2019-07-31 13:35:26 +00:00
araspitzu
9afb26e09c
Add eclair-cli to eclair's docker image (#1063)
* Add eclair-cli to eclair's docker image

* Add instructions to use eclair-cli inside the docker container
2019-07-05 09:10:06 +02:00
araspitzu
94a526cc83
Update link for recommended JDK (#1054) 2019-07-01 09:31:37 +02:00
araspitzu
de50cc437e Remove old service and related docs (#1046) 2019-06-24 17:46:55 +02:00
araspitzu
604fd3170f
Add bot support for code coverage (codecov) (#982)
* Add scoverage-maven-plugin dependency

* Update travis build to generate a scoverage report

* Add custom codecov configuration to have nice PR comments

* Add badge for test coverage in readme
2019-05-09 11:42:38 +02:00
Fabrice Drouin
9f96b1b922 Set default chain to "mainnet" (#989)
Eclair is now configured to run on mainnet by default.
2019-05-09 11:30:26 +02:00
Pierre-Marie Padiou
65918ec0de
Rename eclair.bak to eclair.sqlite.bak (#968)
This removes any ambiguity about what the content of the file is about.
2019-04-25 16:34:05 +02:00
Pierre-Marie Padiou
764a1ae84c Update readme with bitcoin 0.17 instructions (#958)
This has somehow been missed by PR #826.
2019-04-23 16:50:39 +02:00
Fabrice Drouin
bed47de5e3
Live channel database backup (#951)
* Backup running channel database when needed

Every time our channel database needs to be persisted, we create a backup which is always
safe to copy even when the system is busy.

* Upgrade sqlite-jdbc to 3.27.2.1

* BackupHandler: use a specific bounded mailbox

BackupHandler is now private, users have to call BackupHandler.props() which always
specifies our custom bounded maibox.

* BackupHandler: use a specific threadpool with a single thread

* Add backup notification script

Once a new backup has been created, call an optional user defined script.
2019-04-19 22:35:12 +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
araspitzu
fafda93e5b Move the JSON API section of the readme closer to the top (#918)
Also fixed the broken link to old API documentation
2019-03-26 18:29:23 +01:00
araspitzu
a4b94004e4 API: use form data instead of JSON-RPC (#894)
Port the existing API functionalities over a new structure of HTTP endpoints, with the biggest difference being the usage of **named parameters** for the requests (responses are unchanged). RPC methods have become endpoints and the parameters for each are now passed via form-params (clients must use the header "Content-Type" : "multipart/form-data"), this allows for a clearer interpretation of the parameters and results in more elegant parsing code on the server side. It is possible to still use the old API version via a configuration key.

Old API can be used by setting `eclair.api.use-old-api=true`.
2019-03-26 18:10:09 +01:00
Fabrice Drouin
34e51c19cc
Use OpenJDK 11 as default JDK (#846)
* Upgrade to JDK11

Eclair can be built and used on Oracle JDK 1.8 or OpenJDK 11.
JavaFX is now embedded in eclair-node-gui and does not need to be installed separately.

* Install: update java download links

OpenJDK 11 is now our recommendation. Tell users to download java from https://jdk.java.net/11

* README: Rewrite installation instructions
2019-02-21 15:11:44 +01:00
n1bor
6438c65ad9 Add JSON serializer for PaymentRequest (#798)
Also, renamed `checkinvoice` to `parseinvoice`. `checkinvoice` still works but is deprecated.
2019-01-17 15:46:02 +01:00
araspitzu
6d638e9941
Fix findroute documentation (#817)
* Fix the README and help message about the 'findroute' API parameters
2019-01-16 18:35:53 +01:00
Dominique
e3b2992934
Readibility improvements in GUI (#801)
* Improved amounts readability (fixes #542) and added the Bits unit 
denomination in the documentation

* Improved channel panel UI layout

* Added a confirmation dialog when closing a channel, with a short summary 
of the channel to be closed

The balance bar has been shrunk in size so that it should not be mistaken as 
a separator element between channels. The channel's balance, capacity and 
peer node id are now more visible. Also added the short channel id to the 
channel's pane.

fixes #690

* Added node's aggregated balance in the status bar

fixes #775
2019-01-14 16:53:52 +01:00
araspitzu
fd3ff9184e Compute routes backward (#797)
* Support searching backward from the target

* Use the amount+fees with testing for min/max htlc value of edges

* Build the adjacency list graph with incoming edges instead of outgoing

* Make sure we don't find routes longer than the max allowed by the spec

* Remove default amount msat, enhance 'findroute' API

* Optimize tests for ignored edges in Dijkstra

* Enhance test for max route length, fix the length to 20 channels

* Add test for routing to a target that is not in the graph (assisted routes)
2019-01-11 17:20:01 +01:00
Jens Schendel
93464aa7fb Updated readme.md and eclair-cli (#750)
* Minor changes. Typos and grammar corrected.

* Added check for curl and hint ift not installed
2018-11-13 17:35:16 +01:00
Fabrice Drouin
5141cd7d4d
Use different ZMQ block and tx subscriptions
Fixes #733
2018-10-25 14:28:28 +02:00
Fabrice Drouin
ac791d955d
Add instructions for Bitcoin Core 0.17.0 [ci skip] (#732)
* Add instructions for Bitcoin Core 0.17.0 [ci skip]

Bitcoin Core 0.17.0 deprecates the `signrawtransaction` RPC call, which will be removed in version 0.18.0, you need to enable this call if you want your eclair node to use a 0.1.70 node.

* README: add an example of how to use the new bitcoin.conf sections [ci skip]
2018-10-15 14:28:19 +02:00
Gustavo Fernandes
4b6a7c0aad Add logging customisation info (#680) 2018-08-30 14:00:24 +02:00
Pierre-Marie Padiou
148e197e45
(trivial) restore gitter logo color 2018-08-29 14:54:38 +02:00
Pierre-Marie Padiou
75d23cf1b3
Audit: Keep track of sent/received/relayed payments and relay/network fees (#654)
Added a new `AuditDb` which keeps tracks of:
- every single payment (received/sent/relayed)
- every single network fee paid to the miners (funding, closing, and all commit/htlc transactions)

Note that network fees are considered paid when the corresponding tx has reached `min_depth`, it makes sense and allows us to compute the fee in one single place in the `CLOSING` handler. There is an exception for the funding tx, for which we consider the fee paid when the tx has successfully been published to the network. It simplifies the implementation and the tradeoff seems acceptable.

Three new functions have been added to the json-rpc api:
- `audit`: returns all individual payments, with optional filtering on timestamp.
- `networkfees`: returns every single fee paid to the miners, by type (`funding`, `mutual`, `revoked-commit`, etc.) and by channel, with optional filtering on timestamp.
- `channelstats`: maybe the most useful method; it returns a number of information per channel, including the `relayFee` (earned) and the `networkFee` (paid).

The `channels` method now returns details information about channels. It makes it far easier to compute aggregate information about channels using the command line.

Also added a new `ChannelFailed` event that allows e.g. the mobile app to know why a channel got closed.
2018-07-25 16:47:38 +02:00
n1bor
b7b9f4929a Add api call to update channel relay fees (#620)
* add api call to update channel relay fees

* fixed bug in GUI, as channel can had different fees in each direction!

* fire transitions on `TickRefreshChannelUpdate` (fixes #621)

* make router publish `channel_update`s on startup

* (gui) Channel info fees are now options and case where channels have no known fees data is now properly handled.
2018-06-19 14:09:37 +02:00
n1bor
b3731adabd Adding ability to set expiry when creating a new invoice (#632) 2018-06-19 13:13:07 +02:00
Giorgio Regni
42b69585c4 Fixed \ instead of / in docker commands (acinq/eclair) (#584) 2018-05-04 10:56:45 +02:00
Fabrice Drouin
6e29431b88
Update docker link (#557)
fixes #544 [ci skip]
2018-04-13 13:53:30 +02:00
pm47
b2178ade30
back to SNAPSHOT 2018-03-28 21:27:55 +02:00
Pierre-Marie Padiou
242f69fd6f
Add support for mainnet (#513)
* add support for mainnet final pubkeyscript

* electrum: add addresses of electrumx servers on mainnet

* electrum: use chain hash to compute addresses and HD key paths

* store db files in a subdirectory of datadir

* add a 'catchall' around deserialization

* use chain-specific key derivation paths for channel keys

* fixed intermittently failing test (we were comparing timestamps...)

* parameters:
- set default `router-broadcast-interval` to 60s
- set default `mindepth-blocks` to 3 blocks
- removed deprecated setting `router-validate-interval`
- reduce fees: block target 1->2
- reduce `MIN_CLTV_EXPIRY` from 9 to 7
Default value in BOLT11 was indeed 9 blocks, but the absolute minimum
value computed in BOLT2 is 7 blocks.
- remove unused `default-feerate-per-kb`
- set default `max-htlc-value-in-flight-msat`=10mBTC
- set default `max-to-local-delay-blocks` to 2000 blocks

* Update README with instructions for mainnet

* Upgrade to bitcoin-lib 0.9.15 (#516)

* use fees from provider, not default ones
2018-03-28 20:21:19 +02:00
Fabrice Drouin
2a02461bcc
Upgrade to Bitcoin Core 0.16 (#514)
* switch to bitcoin core 0.16.0

* check that we are using bitcoin core 0.16

and check that there are no p2pkh UTXOs

* update readme [ci skip]
2018-03-26 20:56:51 +02:00
n1bor
1a8cb2a694 Addition of API calls checkinvoice and findroute (#475)
* Add api call to check invoice/paymentRequest and return details in json

* Adding in API call to allow user to check route before making send call

* Added a serializer for route response

* Update README to include new checkinvoice and findroute API calls
2018-03-24 10:51:15 +01:00
Fabrice Drouin
2a879f6b0c Update link to latest release (#492)
And specify that we will soon drop support for older (< 0.16) versions of Bitcoin Core
2018-03-20 17:23:34 +01:00
pm47
8721eebc4f
removed lit from Readme.MD (they don't follow the BOLTs) 2018-03-16 17:14:33 +01:00
Pierre-Marie Padiou
dceb6b9b06 Better handling of force-closing of channels (#483)
As soon as we receive a valid closing signature, we will publish the
resulting closing tx instead of our commitment tx if we need to
immediately close the channel (before end of negotiation, e.g. in case
of errors, or in case the counterparty goes OFFLINE).

When the closing signature didn't correspond to one we sent ourselves, we
weren't properly recognizing the publishing tx and went into
`ERR_INFORMATION_LEAK` state.

CMD_CLOSE is now split it to commands: 
* `CMD_CLOSE`: this command will succeed only if the current
channel state is in NORMAL, or if the channel hasn't yet been created.
* `CMD_FORCECLOSE`: the channel will publish its current local
commitment (or its best signed closing tx if it has one).

Using `CMD_FORCECLOSE` is more expensive and it incurs a delay before
funds are spendable, but this can be useful in some situations, for
example when the counterparty isn't responding anymore.

Added a new `forceclose` method to the API and a force close button in 
the GUI.
2018-03-15 18:53:14 +01:00
Stadicus
86bc8761e3 Update README to work with Bitcoin Core 0.16+ (#468)
The Bitcoin Core `addwitnessaddress` rpc command is deprecated in version 0.16.0. Thus, the example `bitcoin.conf` needs to be extended to with the option `deprecatedrpc=addwitnessaddress`.

Without this change, Eclair will not be able to open new channels and the following error message will be written to eclair.log: 

```
WARN akka.actor.OneForOneStrategy akka://default/user/$h/switchboard/peer-0390b6fbf04dd277955ce454c87b270d3c910fa96ef3d78afa4bf17d3b733fb877 - addwitnessaddress is deprecated and will be fully removed in v0.17. To use addwitnessaddress in v0.16, restart bitcoind with -deprecatedrpc=addwitnessaddress. Projects should transition to using the address_type argument of getnewaddress, or option -addresstype=[bech32|p2sh-segwit] instead. (code: -32)
```
2018-03-02 17:12:56 +01:00
Pierre-Marie Padiou
43128636ce Improvements & fixes (#459)
* moved CoinUtils to eclair-core to expose conversion methods

Parsing and converting string amount to BtcAmount objects, and
displaying BtcAmount as well formatted string is a common use case.
Methods that were developed for the gui module should be exposed from
eclair-core so that they can be reused elsewhere.

* increased timeouts in integration tests

* have bitcoin wallet and watcher use a separate client

* return more information on channel opening

* removed `storedChannels` from `Peer` constructor

1) so that they can be garbage-collected
2) that was a memory leak because closed channel would stay forever

* OpenChannel now accepts a feerate param for the funding Tx

User should be able to override the fee rate of the funding tx that he
sends when he opens a channel. This custom fee is entered as a fee rate
in satoshi per byte, and converted to a fee rate per kw.

The default value of this fee rate does not change, and still aims for
the funding tx to be included in a block within the next 6 blocks,
estimation which is made through the FeeProvider class.

* reworked payment events

and made sure we send events even when `PaymentLifecycle` disappeared, e.g.
when we restart right after having sent a payment.
2018-02-27 19:36:56 +01:00
pm47
1b247ae613 back to SNAPSHOT 2018-02-16 18:10:35 +01:00
practicalswift
7a6fa8a619 Fix typos (#417) 2018-01-29 18:42:07 +01:00
Dimitris Tsapakidis
e55e1e0dab Added quotes to eclair.bitcoind.zmq parameter value in README.md (#394)
The sample value for eclair.bitcoind.zmq requires quotes to comply with HOCON specifications.
2018-01-29 18:41:40 +01:00
Dimitris Tsapakidis
d5b0afb9e0 Clarify that Eclair uses Bitcoin Core as bitcoin wallet. (#395) 2018-01-29 18:40:24 +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
Kevin Kelbie
35011d3eca Updated username and password in readme (#371)
Set the same rpc user/password in the example bitcoin core config than the default ones used by eclair.
2018-01-18 15:25:12 +01:00
Benoît Verret
2804e8a919 Remove api.user (#370)
It is not verified in the code.
2018-01-15 21:21:54 +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
Benoît Verret
0781eb7a40 Specify that Bitcoin Core must have wallet enabled (#361) 2018-01-08 23:21:53 +01:00