Skip to content

Commit

Permalink
Merge branch 'master' into delete_invoice
Browse files Browse the repository at this point in the history
  • Loading branch information
rorp committed Oct 8, 2021
2 parents 2edb1ff + 57bf860 commit d42b048
Show file tree
Hide file tree
Showing 129 changed files with 2,461 additions and 5,868 deletions.
2 changes: 0 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,7 @@ COPY pom.xml pom.xml
COPY eclair-core/pom.xml eclair-core/pom.xml
COPY eclair-front/pom.xml eclair-front/pom.xml
COPY eclair-node/pom.xml eclair-node/pom.xml
COPY eclair-node-gui/pom.xml eclair-node-gui/pom.xml
COPY eclair-node/modules/assembly.xml eclair-node/modules/assembly.xml
COPY eclair-node-gui/modules/assembly.xml eclair-node-gui/modules/assembly.xml
RUN mkdir -p eclair-core/src/main/scala && touch eclair-core/src/main/scala/empty.scala
# Blank build. We only care about eclair-node, and we use install because eclair-node depends on eclair-core
RUN mvn install -pl eclair-node -am
Expand Down
4 changes: 0 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,6 @@ eclair-node-<version>-<commit_id>/bin/eclair-node.sh

You can then control your node via the [eclair-cli](https://github.com/ACINQ/eclair/wiki/Usage) or the [API](https://github.com/ACINQ/eclair/wiki/API).

This repository also contains a sample GUI ([eclair-node-gui](https://github.com/ACINQ/eclair/tree/master/eclair-node-gui)).

:rotating_light: The sample GUI should only be used for prototyping and demo purposes: using it on mainnet is unsafe.

:warning: Be careful when following tutorials/guides that may be outdated or incomplete. You must thoroughly read the official eclair documentation before running your own node.

## Configuration
Expand Down
3 changes: 1 addition & 2 deletions codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,4 @@ comment:
layout: "diff, files"

ignore:
- "eclair-node/**/*"
- "eclair-node-gui/**/*"
- "eclair-node/**/*"
3 changes: 1 addition & 2 deletions docs/Architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,11 @@ Some actors are long-lived (e.g. lightning channels) while others are very short

## Top-level projects

Eclair is split into four top-level projects:
Eclair is split into three top-level projects:

- `eclair-core`: core library implementing lightning
- `eclair-node`: server daemon built upon `eclair-core` (exposes a Json RPC and WebSocket endpoint)
- `eclair-front`: when using cluster mode, front-end server daemons handling peer connections
- `eclair-node-gui` (deprecated): sample JavaFX user interface to demo eclair (should not be used in production)

The entry point for `eclair-core` is in `Setup.scala`, where we start the actor system, connect to `bitcoind` and create top-level actors.

Expand Down
146 changes: 137 additions & 9 deletions docs/Configure.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,49 @@
# Configuring Eclair

Eclair reads its configuration file, and writes its logs, to `~/.eclair` by default.
You can change this behavior with the `eclair.datadir` parameter:
---

```sh
eclair-node.sh -Declair.datadir="/path/to/custom/eclair/data/folder"
```
* [Configuration file](#configuration-file)
* [Changing the data directory](#changing-the-data-directory)
* [Splitting the configuration](#splitting-the-configuration)
* [Options reference](#options-reference)
* [Customize features](#customize-features)
* [Customize feerate tolerance](#customize-feerate-tolerance)
* [Examples](#examples)
* [Basic configuration](#basic-configuration)
* [Regtest mode](#regtest-mode)
* [Public node](#public-node)
* [AB-testing for path-finding](#ab-testing-for-path-finding)

## Change your node's configuration
---

The first step is to **actually create the configuration file**.
Go to `eclair.datadir` and create a file named `eclair.conf`.
The encoding should be UTF-8.
## Configuration file

The configuration file for eclair is named `eclair.conf`. It is located in the data directory, which is `~/.eclair` by
default. Note that eclair won't create a configuration file by itself: if you want to change eclair's configuration, you
need to **actually create the configuration file first**. The encoding must be UTF-8.

```sh
# this is the default data directory, it will be created at eclair first startup
mkdir ~/.eclair
vi ~/.eclair/eclair.conf
```

Options are set as key-value pairs and follow the [HOCON syntax](https://github.com/lightbend/config/blob/master/HOCON.md).
Values do not need to be surrounded by quotes, except if they contain special characters.

### Changing the data directory

You can change the data directory with the `eclair.datadir` parameter:
```sh
eclair-node.sh -Declair.datadir="/path/to/custom/eclair/data/folder"
```

### Splitting the configuration

Note that HOCON allows you to have files include other files. This allows you to split your configuration file into
several logical files, for easier management. For example, you could define a file `routing.conf` file with parameters
related to routing configuration, and include it from `eclair.conf`.

## Options reference

Here are some of the most common options:
Expand Down Expand Up @@ -174,3 +202,103 @@ eclair.server.public-ips=[x.x.x.x]
```

You'll also have to make sure the node is accessible from the outside world (port forwarding, firewall,...).

### AB-testing for path-finding

The following configuration enables AB-testing by defining a set of `experiments`, and assigning a percentage of the
traffic to each experiment. The `control` experiment doesn't override any parameter, it uses the defaults.

Note that the percentages of all experiments sum to 100 %.

```conf
eclair {
router {
path-finding {
experiments {
control = ${eclair.router.path-finding.default} {
percentage = 50
}
// alternative routing heuristics (replaces ratios)
test-failure-cost = ${eclair.router.path-finding.default} {
use-ratios = false
locked-funds-risk = 1e-8 // msat per msat locked per block. It should be your expected interest rate per block multiplied by the probability that something goes wrong and your funds stay locked.
// 1e-8 corresponds to an interest rate of ~5% per year (1e-6 per block) and a probability of 1% that the channel will fail and our funds will be locked.
// Virtual fee for failed payments
// Corresponds to how much you are willing to pay to get one less failed payment attempt
failure-cost {
fee-base-msat = 2000
fee-proportional-millionths = 500
}
percentage = 10
}
// To optimize for fees only:
test-fees-only = ${eclair.router.path-finding.default} {
ratios {
base = 1
cltv = 0
channel-age = 0
channel-capacity = 0
}
hop-cost {
fee-base-msat = 0
fee-proportional-millionths = 0
}
percentage = 10
}
// To optimize for shorter paths:
test-short-paths = ${eclair.router.path-finding.default} {
ratios {
base = 1
cltv = 0
channel-age = 0
channel-capacity = 0
}
hop-cost {
// High hop cost penalizes strongly longer paths
fee-base-msat = 10000
fee-proportional-millionths = 10000
}
percentage = 10
}
// To optimize for successful payments:
test-pay-safe = ${eclair.router.path-finding.default} {
ratios {
base = 0
cltv = 0
channel-age = 0.5 // Old channels should have less risk of failures
channel-capacity = 0.5 // High capacity channels are more likely to have enough liquidity to relay our payment
}
hop-cost {
// Less hops means less chances of failures
fee-base-msat = 1000
fee-proportional-millionths = 1000
}
percentage = 10
}
// To optimize for fast payments:
test-pay-fast = ${eclair.router.path-finding.default} {
ratios {
base = 0.2
cltv = 0.5 // In case of failure we want our funds back as fast as possible
channel-age = 0.3 // Older channels are more likely to run smoothly
channel-capacity = 0
}
hop-cost {
// Shorter paths should be faster
fee-base-msat = 10000
fee-proportional-millionths = 10000
}
percentage = 10
}
}
}
}
}
```
Loading

0 comments on commit d42b048

Please sign in to comment.