Skip to content

Commit 966a7b3

Browse files
committed
Merge commit '4df8cd079490e937f0d7ee8a20d6cd4f95e6b6d9' into blip18_inbound_fees
2 parents 58d663e + 4df8cd0 commit 966a7b3

File tree

256 files changed

+12470
-4414
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

256 files changed

+12470
-4414
lines changed

.github/workflows/latest-bitcoind.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,15 +38,15 @@ jobs:
3838
with:
3939
path: eclair
4040

41-
- name: Set up JDK 11
41+
- name: Set up JDK 21
4242
uses: actions/setup-java@v3
4343
with:
44-
java-version: 11
44+
java-version: 21
4545
distribution: 'adopt'
4646

4747
- name: Configure OS settings
4848
run: echo "fs.file-max = 1024000" | sudo tee -a /etc/sysctl.conf
4949

5050
- name: Run eclair tests
51-
run: BITCOIND_DIR=$GITHUB_WORKSPACE/bitcoin/build/src mvn test
51+
run: BITCOIND_DIR=$GITHUB_WORKSPACE/bitcoin/build/src ./mvnw test
5252
working-directory: ./eclair

.github/workflows/main.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ jobs:
1313
timeout-minutes: 30
1414

1515
steps:
16-
- uses: actions/checkout@v3
16+
- uses: actions/checkout@v4
1717

18-
- name: Set up JDK 11
19-
uses: actions/setup-java@v3
18+
- name: Set up JDK 21
19+
uses: actions/setup-java@v4
2020
with:
21-
java-version: 11
21+
java-version: 21
2222
distribution: 'adopt'
2323

2424
- name: Cache Maven dependencies
@@ -34,7 +34,7 @@ jobs:
3434
# NB: we exclude external API tests from the CI, because we don't want our build to fail because a dependency is failing.
3535
# This means we won't automatically catch changes in external APIs, but developers should regularly run the test suite locally so in practice it shouldn't be a problem.
3636
- name: Build with Maven
37-
run: mvn test-compile && mvn scoverage:report -DtagsToExclude=external-api
37+
run: ./mvnw test-compile && ./mvnw scoverage:report -DtagsToExclude=external-api
3838

3939
- name: Upload coverage to Codecov
4040
uses: codecov/codecov-action@v3

.mvn/wrapper/maven-wrapper.jar

61.6 KB
Binary file not shown.
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
wrapperVersion=3.3.2
18+
distributionType=script
19+
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.9/apache-maven-3.9.9-bin.zip
20+
distributionSha256Sum=4ec3f26fb1a692473aea0235c300bd20f0f9fe741947c82c1234cefd76ac3a3c
21+
wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.3.2/maven-wrapper-3.3.2.jar
22+
wrapperSha256Sum=3d8f20ce6103913be8b52aef6d994e0c54705fb527324ceb9b835b338739c7a8

BUILD.md

Lines changed: 25 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,73 +2,72 @@
22

33
## Requirements
44

5-
- [OpenJDK 11](https://adoptopenjdk.net/?variant=openjdk11&jvmVariant=hotspot).
6-
- [Maven](https://maven.apache.org/download.cgi) 3.6.0 or newer
5+
- [OpenJDK 21](https://adoptium.net/temurin/releases/?package=jdk&version=21).
76

87
## Build
98

109
Eclair is packaged as a compressed archive with a launcher script. The archives are built deterministically
1110
so it's possible to reproduce the build and verify its equality byte-by-byte. To build the exact same artifacts
12-
that we release, you must use the build environment (OS, JDK, maven...) that we specify in our release notes.
11+
that we release, you must use the build environment (OS, JDK...) that we specify in our release notes.
1312

1413
To build the project and run the tests, simply run:
1514

1615
```shell
17-
mvn package
16+
./mvnw package
1817
```
1918

2019
Notes:
2120

2221
- This command will build all modules (core, node, gui).
23-
- If the build fails, you may need to clean previously built artifacts with the `mvn clean` command.
22+
- If the build fails, you may need to clean previously built artifacts with the `./mvnw clean` command.
2423
- Archives can be found in the `target` folder for each module.
2524

2625
### Skip tests
2726

2827
Running tests takes time. If you want to skip them, use `-DskipTests`:
2928

3029
```shell
31-
mvn package -DskipTests
30+
./mvnw package -DskipTests
3231
```
3332

3433
### Run tests
3534

3635
To only run the tests, run:
3736

3837
```shell
39-
mvn test
38+
./mvnw test
4039
```
4140

4241
To run tests for a specific class, run:
4342

4443
```shell
45-
mvn test -Dsuites=*<TestClassName>
44+
./mvnw test -Dsuites=*<TestClassName>
4645
```
4746

4847
To run tests using a specific number of threads, run:
4948

5049
```shell
51-
mvn -T <thread_count> test
50+
./mvnw -T <thread_count> test
5251
```
5352

5453
To run tests with a specific version of `bitcoind`, run:
5554

5655
```shell
57-
BITCOIND_DIR=<absolute/path/to/directory> mvn test
56+
BITCOIND_DIR=<absolute/path/to/directory> ./mvnw test
5857
```
5958

6059
### Build specific module
6160

6261
To only build the `eclair-node` module, run:
6362

6463
```shell
65-
mvn package -pl eclair-node -am -Dmaven.test.skip=true
64+
./mvnw package -pl eclair-node -am -Dmaven.test.skip=true
6665
```
6766

6867
To install `eclair-core` into your local maven repository and use it in another project, run:
6968

7069
```shell
71-
mvn clean install -pl eclair-core -am -Dmaven.test.skip=true
70+
./mvnw clean install -pl eclair-core -am -Dmaven.test.skip=true
7271
```
7372

7473
## Build the API documentation
@@ -84,3 +83,17 @@ The API doc is generated via slate and hosted on github pages. To make a change
8483
5. Push your commit to remote.
8584
6. Run `./deploy.sh`
8685
7. Wait a few minutes and the doc should be updated at [https://acinq.github.io/eclair](https://acinq.github.io/eclair)
86+
87+
## Updating Eclair dependencies checksums
88+
89+
Eclair dependencies (including maven plugins and their dependencies) are verified against a list of trusted checksums (located in `.mvn/checksums/checksums-central.sha256`).
90+
Please note that dependencies are verified only if they are actually used in the build phase that is running, so you may be able to modify the checksum of a dependency
91+
and still run a successful build phase that does not use them (for example you can modify the checksum of a `maven-deploy-plugin` dependency and still run `./mvnw test` successfully).
92+
To make local development and testing easier, SNAPSHOT dependencies are not verified.
93+
94+
To re-create the trusted checksums file, run:
95+
96+
```shell
97+
$ rm ~/.m2/wrapper ~/.sbt -rf
98+
$ ./mvnw clean install scoverage:report -DskipTests -Daether.artifactResolver.postProcessor.trustedChecksums.record
99+
```

Dockerfile

Lines changed: 8 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,33 @@
1-
FROM adoptopenjdk/openjdk11:jdk-11.0.3_7-alpine as BUILD
2-
3-
# Setup maven, we don't use https://hub.docker.com/_/maven/ as it declare .m2 as volume, we loose all mvn cache
4-
# We can alternatively do as proposed by https://github.com/carlossg/docker-maven#packaging-a-local-repository-with-the-image
5-
# this was meant to make the image smaller, but we use multi-stage build so we don't care
6-
RUN apk add --no-cache curl tar bash
7-
8-
ARG MAVEN_VERSION=3.9.2
9-
ARG USER_HOME_DIR="/root"
10-
ARG SHA=900bdeeeae550d2d2b3920fe0e00e41b0069f32c019d566465015bdd1b3866395cbe016e22d95d25d51d3a5e614af2c83ec9b282d73309f644859bbad08b63db
11-
ARG BASE_URL=https://archive.apache.org/dist/maven/maven-3/${MAVEN_VERSION}/binaries
12-
13-
RUN mkdir -p /usr/share/maven /usr/share/maven/ref \
14-
&& curl -fsSL -o /tmp/apache-maven.tar.gz ${BASE_URL}/apache-maven-${MAVEN_VERSION}-bin.tar.gz \
15-
&& echo "${SHA} /tmp/apache-maven.tar.gz" | sha512sum -c - \
16-
&& tar -xzf /tmp/apache-maven.tar.gz -C /usr/share/maven --strip-components=1 \
17-
&& rm -f /tmp/apache-maven.tar.gz \
18-
&& ln -s /usr/share/maven/bin/mvn /usr/bin/mvn
19-
20-
ENV MAVEN_HOME /usr/share/maven
21-
ENV MAVEN_CONFIG "$USER_HOME_DIR/.m2"
1+
FROM eclipse-temurin:21-jdk-alpine as BUILD
222

233
# Let's fetch eclair dependencies, so that Docker can cache them
244
# This way we won't have to fetch dependencies again if only the source code changes
255
# The easiest way to reliably get dependencies is to build the project with no sources
266
WORKDIR /usr/src
7+
COPY mvnw mvnw
8+
COPY .mvn .mvn
279
COPY pom.xml pom.xml
2810
COPY eclair-core/pom.xml eclair-core/pom.xml
2911
COPY eclair-front/pom.xml eclair-front/pom.xml
3012
COPY eclair-node/pom.xml eclair-node/pom.xml
3113
COPY eclair-node/modules/assembly.xml eclair-node/modules/assembly.xml
3214
RUN mkdir -p eclair-core/src/main/scala && touch eclair-core/src/main/scala/empty.scala
3315
# Blank build. We only care about eclair-node, and we use install because eclair-node depends on eclair-core
34-
RUN mvn install -pl eclair-node -am
35-
RUN mvn clean
16+
RUN ./mvnw install -pl eclair-node -am
17+
RUN ./mvnw clean
3618

3719
# Only then do we copy the sources
3820
COPY . .
3921

4022
# And this time we can build in offline mode, specifying 'notag' instead of git commit
41-
RUN mvn package -pl eclair-node -am -DskipTests -Dgit.commit.id=notag -Dgit.commit.id.abbrev=notag -o
23+
RUN ./mvnw package -pl eclair-node -am -DskipTests -Dgit.commit.id=notag -Dgit.commit.id.abbrev=notag -o
4224
# It might be good idea to run the tests here, so that the docker build fail if the code is bugged
4325

44-
# We currently use a debian image for runtime because of some jni-related issue with sqlite
45-
FROM openjdk:11.0.4-jre-slim
26+
FROM eclipse-temurin:21-jre-alpine
4627
WORKDIR /app
4728

4829
# install jq for eclair-cli
49-
RUN apt-get update && apt-get install -y bash jq curl unzip
30+
RUN apk add bash jq curl unzip
5031

5132
# copy and install eclair-cli executable
5233
COPY --from=BUILD /usr/src/eclair-core/eclair-cli .

README.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ This means that instead of re-implementing them, Eclair benefits from the verifi
6262

6363
* Eclair needs a _synchronized_, _segwit-ready_, **_zeromq-enabled_**, _wallet-enabled_, _non-pruning_, _tx-indexing_ [Bitcoin Core](https://github.com/bitcoin/bitcoin) node.
6464
* You must configure your Bitcoin node to use `bech32` or `bech32m` (segwit) addresses. If your wallet has "non-segwit UTXOs" (outputs that are neither `p2sh-segwit`, `bech32` or `bech32m`), you must send them to a `bech32` or `bech32m` address before running Eclair.
65-
* Eclair requires Bitcoin Core 27.2 or higher. If you are upgrading an existing wallet, you may need to create a new address and send all your funds to that address.
65+
* Eclair requires Bitcoin Core 28.1 or higher. If you are upgrading an existing wallet, you may need to create a new address and send all your funds to that address.
6666

6767
Run bitcoind with the following minimal `bitcoin.conf`:
6868

@@ -94,7 +94,7 @@ rpcclienttimeout=30
9494

9595
Eclair is developed in [Scala](https://www.scala-lang.org/), a powerful functional language that runs on the JVM, and is packaged as a ZIP archive.
9696

97-
To run Eclair, you first need to install Java, we recommend that you use [OpenJDK 11](https://adoptopenjdk.net/?variant=openjdk11&jvmVariant=hotspot). Other runtimes also work, but we don't recommend using them.
97+
To run Eclair, you first need to install Java. Eclair targets Java 21 and will run on any compatible Java runtime, we recommend that you use [OpenJDK 21](https://adoptium.net/temurin/releases/?package=jdk&version=21).
9898

9999
Then download our latest [release](https://github.com/ACINQ/eclair/releases), unzip the archive and run the following command:
100100

@@ -321,10 +321,8 @@ zmqpubrawtx=tcp://127.0.0.1:29001
321321
## Tools
322322

323323
* [Demo Shop](https://starblocks.acinq.co/) - an example testnet Lightning web shop.
324-
* [Network Explorer](https://explorer.acinq.co/) - a Lightning network visualization tool.
325324

326325
## Resources
327326

328327
* [1] [The Bitcoin Lightning Network: Scalable Off-Chain Instant Payments](https://lightning.network/lightning-network-paper.pdf) by Joseph Poon and Thaddeus Dryja
329328
* [2] [Reaching The Ground With Lightning](https://github.com/ElementsProject/lightning/raw/master/doc/deployable-lightning.pdf) by Rusty Russell
330-
* [3] [Lightning Network Explorer](https://explorer.acinq.co) - Explore testnet LN nodes you can connect to

contrib/arm64v8.Dockerfile

Lines changed: 0 additions & 65 deletions
This file was deleted.

docs/Cluster.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ $ git clone git@github.com:ACINQ/eclair.git
146146
$ vi eclair-core/src/main/reference.conf # set akka.remote.artery.transport = "tls-tcp"
147147
$ cp akka-cluster-tls.jks eclair-front/modules/awseb/ # copy the file you generated
148148
$ vi eclair-front/modules/awseb.xml # uncomment the relevant parts
149-
$ mvn package -DskipTests
149+
$ ./mvnw package -DskipTests
150150
```
151151
Alternatively, you can also edit the existing bundle and manually add the `akka-cluster-tls.jks` file to the root of the zip archive. You will also need to set `akka.remote.artery.transport=tls-tcp` at runtime.
152152

docs/Guides.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ This section contains how-to guides for more advanced scenarios:
77
* [Manage Bitcoin Core's private keys](./ManagingBitcoinCoreKeys.md)
88
* [Use Tor with Eclair](./Tor.md)
99
* [Multipart Payments](./MultipartPayments.md)
10-
* [Trampoline Payments](./TrampolinePayments.md)
1110
* [Monitoring Eclair](./Monitoring.md)
1211
* [PostgreSQL Configuration](./PostgreSQL.md)
1312
* [Perform Circular Rebalancing](./CircularRebalancing.md)

0 commit comments

Comments
 (0)