1
0
Fork 0
mirror of https://github.com/ACINQ/eclair.git synced 2025-03-12 10:30:45 +01:00
Commit graph

58 commits

Author SHA1 Message Date
Fabrice Drouin
4ad2f99370
Update bitcoin lib (#3015)
* Use bitcoin-lib 0.36

* Exclude older kotlin standard libraries
2025-02-24 17:09:53 +01:00
Pierre-Marie Padiou
bd08bcddd2
fixup! Update logback to 1.5.16 (#2995) (#3004)
There were more unused appenders.
2025-02-07 11:22:04 +01:00
Pierre-Marie Padiou
ee7052922c
Update logback to 1.5.16 (#2995)
As logback 1.2.x is unmaintained: https://logback.qos.ch/news.html.

Akka is pulling an old version of slf4j which makes the build fail, we
explicitly request slf4j-api 2.0.16, which should be a drop-in
replacement: https://www.slf4j.org/faq.html#changesInVersion200
2025-02-06 13:37:13 +01:00
Fabrice Drouin
a35a972081
Build against Java 21 (#2929)
* Update kamon and kanela-agent

Previous version was not compatible with JDK21, see https://github.com/kamon-io/kanela/issues/150.

* Add and configure maven wrapper to use maven 3.9.9

This will make it easier to control which version of maven is used to build eclair, which in turns makes deterministic builds easier, as well as using recent compiler options (to target newer JDKs for example).
For example, even recent versions of Github runner images use an old version of maven and there is no easy way to upgrade.

* Update Dockerfile

We now use multiarch (amd64/arm64) base images.

* Run CI tests with JDK21

* Update doc to recommend Adoptium OpenJDK21

* Target Java 21

Eclair now targets Java 21 and will require a compatible Java Runtime Environment.
It will no longer work on JRE 11 and JRE 17.
2025-01-07 15:56:32 +01:00
Bastien Teinturier
4d930c776b
Back to dev (#2957)
After the v0.11.0 release.
2024-12-04 10:25:12 +01:00
Bastien Teinturier
7e7ad4549e
Eclair v0.11.0 release (#2956) 2024-12-04 09:43:06 +01:00
Pierre-Marie Padiou
14a4ea45b1
Upgrade kamon to 2.7.3 (#2879)
Also add an exclusion on kamon-prometheus. The exclusion was previously only present in `eclair-node/pom.xml`.
2024-07-12 14:17:26 +02:00
Bastien Teinturier
145d0f4860
Back to dev (#2832)
After the v0.10.0 release.
2024-02-29 10:35:38 +01:00
Bastien Teinturier
a63d2c2909
Eclair v0.10.0 release (#2831) 2024-02-28 17:39:44 +01:00
Thabokani
63a1d77baa
Fix typos in various comments (#2805) 2024-01-02 09:31:57 +01:00
Bastien Teinturier
be4ed3c68b
Update logback-classic (#2796)
This version of logback fixes the following CVE:

"a potential denial of service attack on a centralized logback receiver
when a third party controlling a remote appender connects to said
receiver and could shut down or slow down logging of events."

Eclair isn't affected since we don't use logback receivers, but if there
are applications or plugins that depend on eclair and use logback
receivers, it's better to use the logback version containing the fix.
2023-12-06 15:09:11 +01:00
Bastien Teinturier
e73c1cf45c
Use typed TxId (#2742)
And explicitly encode/decode as a `tx_hash` for lightning messages.
2023-11-23 16:04:31 +01:00
Bastien Teinturier
e3ba524306
Improve startup resource usage (#2733)
* Move some logs to debug level

This should reduce the pressure on the file system and RAM without impacting
our ability to troubleshoot common issues.

* Avoid herd effect watching external channels

When we restart, we put watches on every public channel in the network.
That creates a lot of RPC calls to bitcoind, which aren't time-sensitive.
It's ok if we don't see immediately that an external channel was closed,
the spec even recommends waiting for 12 blocks to distinguish a channel
close from a splice.

By default, we now smooth that over a 1 hour period. This means we should
also allow our peers to be late at discovering that a channel was closed.
We thus stop sending a `warning` in that case and increase our tolerance
to that kind of behavior.

* Avoid herd effect watching local channels

When we restart, we set watches on our funding transactions. But we don't
actually need to watch them immediately, we just need enough time to react
to our peer broadcasting their commitment. We use long `cltv_delta` delays
to guarantee funds safety, so we can spread out the watches across several
blocks to reduce the start-up load. It essentially is the same thing as
receiving mempool transactions or blocks after a delay, which is something
that our threat model already takes into account.
2023-09-26 16:31:17 +02:00
Fabrice Drouin
8d4205271d
Update kanela-agent version in starter scripts to match the version set in pom.xml (#2730) 2023-08-29 09:06:48 +02:00
Bastien Teinturier
3e436114a4
Update dependencies (#2710)
* Update code dependencies

I also wanted to update logback, but I'm hitting issues because of our
custom logger in `FixtureSpec` (`LoggingEventAware` not found).

* Update build dependencies

We're now using mvn 3.9.2 to build eclair, which reports warnings in some
of the build plugins we use. Updating plugins fixes most of the warnings,
and the remaining warnings have to be fixed by the plugins themselves
to support mvn 4.x.
2023-07-13 12:41:45 +02:00
Bastien Teinturier
210b9198b3
Back to dev (#2694) 2023-06-19 11:08:09 +02:00
Bastien Teinturier
623f7e4866
Eclair v0.9.0 release (#2693) 2023-06-19 10:21:01 +02:00
Tarek Nasser
396c84d6a2
Included doc folder in the assembly zip (#2604)
Included doc folder in the assembly zip. ** wildcard indicates all the files in the current folder and all the files in the subfolders of the current folder.

Fixes #1645
2023-05-04 13:01:04 +02:00
Florian Schmaus
8084f3c7fc
Properly quote urls in bash scripts (#2580)
To avoid bash interpreting '&' as background job metacharacter,
properly quote the string containing it.

Otherwise you get output like the following:
eclair-node[3517981]: No java installations was detected.
eclair-node[3518011]: Please go to https://adoptopenjdk.net/?variant=openjdk11
eclair-node[3518012]: /usr/bin/eclair-node: line 285: and: command not found
2023-01-23 11:38:44 +01:00
Bastien Teinturier
bf087698cc
Update dependencies (#2537)
And move kamon-prometheus to eclair-node/eclair-front.
2022-12-20 16:55:31 +01:00
Bastien Teinturier
cd9ca57562
Back to Dev (#2515)
After the v0.8.0 release.
2022-12-01 15:18:59 +01:00
Bastien Teinturier
00774717f6
Eclair v0.8.0 release (#2470) 2022-12-01 14:52:59 +01:00
Pierre-Marie Padiou
e5f5cd152e
Add support for zero-conf and scid-alias (#2224)
This implements lightning/bolts#910.

Co-authored-by: Bastien Teinturier <31281497+t-bast@users.noreply.github.com>
2022-06-15 13:09:54 +02:00
Pierre-Marie Padiou
9610fe30e3
Define a proper base class for fixture tests (#2286)
This PR does two main things:
- introduce a new `FixtureSpec` base class for tests that involve a fixture. See the scaladoc for more info. 
- add new simple integration tests in package `integration.basic`. They are based on `MinimalNodeFixture`, which is a full setup for a node with real actors, except the bitcoin part (watcher/wallet) which is mocked. They are much lighter than our previous integration tests, which allow us to keep each test individual, as opposed to having all tests of the same suite depend on each other. We can define more complex fixtures with any number of nodes.

Other minor improvements:
- update scalatest version
- simplify `ChannelStateTestsHelperMethods`
- replace all === by ==

Triple equals allows customizing the equality method, but we never use
that.

Detailed errors (which is what we were looking for) are provided by
mixing in scalatest's `Assertions` and using the regular `assert(x==y)`
syntax. The `Assertions` trait is already mixed in by default in all
scalatest suites.
2022-06-03 09:58:53 +02:00
Pierre-Marie Padiou
bb7703aa5d
Add simple integration test between Channel and Router (#2270)
In this PR we add a basic integration test between `Channel` and `Router` that checks the proper handling of local announcements.

* disable router rebroadcast in tests

* use separate ActorSystem for alice and bob in tests

* add a simple channel-router integration test

* fix bug found in new channel-router test

The new test was failing, due to a bug. When a local
channel graduates from private to public, we do not copy existing
known `channel_update`s. Current implementation guarantees that we
will process our local `channel_update` immediately, but what about our
peer?

* fix rebroadcast for local announcements

We fix a second bug where gossip origin wasn't properly set for local
announcements

* increase ram for tests to 2G

* improve debuggability of integration tests
2022-05-19 09:39:58 +02:00
Fabrice Drouin
7883bf621d
Use bitcoin-kmp through bitcoin-lib (#2038)
We use a version of bitcoin-lib that uses bitcon-kmp under the hood.
Its API is the same as before, but its package is now fr.acinq.bitcoin.scalacompat
2022-04-05 17:04:33 +02:00
Pierre-Marie Padiou
6823309874
Use NodeAddress everywhere instead of InetAddress (#2202)
* use `NodeAddress` everywhere instead of `InetAddress`

This makes us control more strictly when and where name resolution happens, which is important in a security-hardened setup. The `InetAddress` jdk class indeed does a lot of things behind the scenes, but now we restrict it to tcp-related classes like `Client` and `Server`.

Also, in _cluster mode_ all outgoing connections (including tor) are now made on the front.

* upgrade guava and rewrite nodeuri tests

There is no reason to use the version of guava targetting android anymore. Also `HostAndPort` was in beta in our current lib version.

We now use guava's `InetAddresses.toUriString()` to format host string, instead of manually adding brackets.

Reworked `NodeURI` tests:
- less repetition with one single test and multiple `testCases`
- focus on non-reg (no need to verify what we know we don't support)
2022-03-25 14:32:35 +01:00
Bastien Teinturier
99aabdabd0
Add txId in logback.xml (#2183)
We changed the logging MDC key for tx-publishing in #2131, but forgot to
add a formatting rule in logback.xml for that new field, so it wasn't
written to logs.
2022-02-17 08:19:00 +01:00
Thomas HUET
9401592382
Typed features (#2164)
Give different types to init features / node announcement features / invoice features.

We now accept more invoices (we would previously reject invoices if they required a feature that we don't support but that we know is irrelevant for invoices).
2022-02-07 09:51:38 +01:00
Bastien Teinturier
44510698f7
Back to Dev (#2159) 2022-02-01 10:42:29 +01:00
Bastien Teinturier
a804905c0b
Eclair v0.7.0 release (#2158) 2022-02-01 08:34:50 +01:00
Pierre-Marie Padiou
75ef66e54c
Front: use IMDSv2 to retrieve the instance ip (#2146)
This is used by the built-in AWS Beanstalk package.
2022-01-25 17:23:41 +01:00
Bastien Teinturier
58f9ebc624
Use BlockHeight everywhere (#2129)
We now have this better type to remove ambiguity.
We should use it wherever it makes sense.
There shouldn't be any business logic change in this commit.
2022-01-19 11:31:54 +01:00
Pierre-Marie Padiou
27579a5786
(Minor) Use sys package instead of System when applicable (#2124)
Use scala's `sys.exit()` instead of java's `System.exit()`, etc.
2022-01-06 18:55:46 +01:00
Pierre-Marie Padiou
c5fa39f754
Front: stop the jvm after coordinated shutdown (#2028)
The app must stop when connection to the backend fails. It will be gracefully restarted on Beanstalk instead of just hanging.

Fixes a regression introduced by #1912.
2021-10-25 15:54:16 +02:00
Bastien Teinturier
765a0c5436
Add log file for important notifications (#1982)
Add a new log file for important notifications that require an action from
the node operator.

Using a separate log file makes it easier than grepping specific messages
from the standard logs, and lets us use a different style of messaging,
where we provide more information about what steps to take to resolve
the issue.

We rely on an event sent to the event stream so that plugins can also pick
it up and connect with notification systems (push, messages, mails, etc).
2021-10-25 11:21:39 +02:00
Bastien Teinturier
57bf86044e
Back to Dev (#1993) 2021-10-08 09:58:47 +02:00
Bastien Teinturier
6817d6f26e
Eclair v0.6.2 release (#1992) 2021-10-08 09:21:34 +02:00
Pierre-Marie Padiou
118285f4a0
Gracefully release Postgres lock on shutdown (#1912)
This allows instant restart of eclair when using Postgres backend.

Fixes #1896.
2021-09-03 11:34:16 +02:00
Bastien Teinturier
cafaeedef4
Set version to 0.6.2-SNAPSHOT (#1888) 2021-07-19 17:14:08 +02:00
Bastien Teinturier
d3ae32326e
Set version to 0.6.1 (#1887) 2021-07-19 15:36:23 +02:00
Pierre-Marie Padiou
c22596bb92
Update dependencies and enable fatal warnings (#1885)
Co-authored-by: Bastien Teinturier <31281497+t-bast@users.noreply.github.com>
2021-07-16 19:02:18 +02:00
Bastien Teinturier
76894bd2e1
Add additional PRNG (#1774)
In case of catastrophic failures of the `SecureRandom` instance, we add
a secondary randomness source that we mix into the random stream.

This is a somewhat weak random source and should not be used on its own,
but it doesn't hurt to xor it with the output of `SecureRandom`.

We use an actor that listens to events in the system and inject them
in our weak pseudo-RNG.
2021-05-19 15:29:32 +02:00
Bastien Teinturier
a658fa26f4
Set version to 0.6.1-SNAPSHOT (#1813) 2021-05-19 15:08:42 +02:00
Bastien Teinturier
f89b0925a7
Set version to 0.6.0 (#1812) 2021-05-19 11:54:44 +02:00
Bastien Teinturier
9e4042fd4c
Migrate ZmqWatcher to akka-typed (#1759)
And re-work watch types and bitcoin events.
The type architecture is cleaner and more future-proof.
More tests have also been added.
2021-05-04 18:22:48 +02:00
Pierre-Marie Padiou
223a14cb59
Remove bintray (#1785)
Bintray has been discontinued and artifacts have been migrated to Maven
Central.
2021-05-04 15:38:46 +02:00
Bastien Teinturier
7819faec39
Move protocol codecs to their own package (#1736)
This is a follow-up for #1732

Codecs in the protocol package will always be backwards-compatible,
as they are defined in the spec.
2021-03-23 13:57:02 +01:00
Bastien Teinturier
163700a232
Set version to 0.5.2-SNAPSHOT (#1714) 2021-03-03 15:29:26 +01:00
Bastien Teinturier
98bb7be70a
Set version to 0.5.1 (#1707) 2021-03-03 11:38:00 +01:00