Skip to content

Commit

Permalink
Update dependencies (#2710)
Browse files Browse the repository at this point in the history
* 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.
  • Loading branch information
t-bast authored Jul 13, 2023
1 parent cf46b64 commit 3e43611
Show file tree
Hide file tree
Showing 13 changed files with 55 additions and 57 deletions.
24 changes: 12 additions & 12 deletions eclair-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
<plugin>
<groupId>com.googlecode.maven-download-plugin</groupId>
<artifactId>download-maven-plugin</artifactId>
<version>1.3.0</version>
<version>1.6.8</version>
<executions>
<execution>
<id>download-bitcoind</id>
Expand Down Expand Up @@ -174,7 +174,7 @@
<dependency>
<groupId>org.json4s</groupId>
<artifactId>json4s-jackson_${scala.version.short}</artifactId>
<version>4.0.3</version>
<version>4.0.6</version>
</dependency>
<dependency>
<groupId>com.softwaremill.sttp.client3</groupId>
Expand All @@ -185,7 +185,7 @@
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-all</artifactId>
<version>4.1.42.Final</version>
<version>4.1.94.Final</version>
</dependency>
<!-- BITCOIN -->
<dependency>
Expand All @@ -208,18 +208,18 @@
<dependency>
<groupId>org.scodec</groupId>
<artifactId>scodec-core_${scala.version.short}</artifactId>
<version>1.11.9</version>
<version>1.11.10</version>
</dependency>
<dependency>
<!-- needed to fix "No implicit Ordering defined for scodec.bits.ByteVector" -->
<groupId>org.scodec</groupId>
<artifactId>scodec-bits_${scala.version.short}</artifactId>
<version>1.1.30</version>
<version>1.1.37</version>
</dependency>
<dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
<version>1.9</version>
<version>1.15</version>
</dependency>
<!-- LOGGING -->
<dependency>
Expand All @@ -231,27 +231,27 @@
<dependency>
<groupId>org.jheaps</groupId>
<artifactId>jheaps</artifactId>
<version>0.9</version>
<version>0.14</version>
</dependency>
<dependency>
<groupId>org.xerial</groupId>
<artifactId>sqlite-jdbc</artifactId>
<version>3.39.2.0</version>
<version>3.42.0.0</version>
</dependency>
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>42.3.3</version>
<version>42.6.0</version>
</dependency>
<dependency>
<groupId>com.zaxxer</groupId>
<artifactId>HikariCP</artifactId>
<version>3.4.2</version>
<version>4.0.3</version>
</dependency>
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcprov-jdk15on</artifactId>
<version>1.68</version>
<version>1.70</version>
</dependency>
<dependency>
<!-- This is to get rid of '[WARNING] warning: Class javax.annotation.Nonnull not found - continuing with a stub.' compile errors -->
Expand All @@ -267,7 +267,7 @@
<dependency>
<groupId>com.softwaremill.quicklens</groupId>
<artifactId>quicklens_${scala.version.short}</artifactId>
<version>1.5.0</version>
<version>1.9.4</version>
</dependency>
<!-- MONITORING -->
<dependency>
Expand Down
8 changes: 4 additions & 4 deletions eclair-core/src/main/scala/fr/acinq/eclair/Setup.scala
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,10 @@ class Setup(val datadir: File,
seeds_opt: Option[Seeds] = None,
db: Option[Databases] = None)(implicit system: ActorSystem) extends Logging {

implicit val timeout = Timeout(30 seconds)
implicit val formats = org.json4s.DefaultFormats
implicit val ec = ExecutionContext.Implicits.global
implicit val sttpBackend = OkHttpFutureBackend()
implicit val timeout: Timeout = Timeout(30 seconds)
implicit val formats: org.json4s.Formats = org.json4s.DefaultFormats
implicit val ec: ExecutionContext = ExecutionContext.Implicits.global
implicit val sttpBackend: sttp.client3.SttpBackend[Future, sttp.capabilities.WebSockets] = OkHttpFutureBackend()

logger.info(s"hello!")
logger.info(s"version=${Kit.getVersion} commit=${Kit.getCommit}")
Expand Down
4 changes: 2 additions & 2 deletions eclair-core/src/main/scala/fr/acinq/eclair/UInt64.scala
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ object UInt64 {

object Conversions {

implicit def intToUint64(l: Int) = UInt64(l)
implicit def intToUint64(l: Int): UInt64 = UInt64(l)

implicit def longToUint64(l: Long) = UInt64(l)
implicit def longToUint64(l: Long): UInt64 = UInt64(l)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ package fr.acinq.eclair.blockchain.bitcoind.rpc
import fr.acinq.eclair.KamonExt
import fr.acinq.eclair.blockchain.Monitoring.{Metrics, Tags}
import fr.acinq.eclair.json.{ByteVector32KmpSerializer, ByteVector32Serializer}
import org.json4s.DefaultFormats
import org.json4s.JsonAST.JValue
import org.json4s.jackson.Serialization
import org.json4s.jackson.{JacksonSerialization, Serialization}
import org.json4s.{DefaultFormats, Formats}
import sttp.client3._
import sttp.client3.json4s._
import sttp.model.StatusCode
Expand All @@ -34,15 +34,15 @@ import scala.util.{Failure, Success, Try}

class BasicBitcoinJsonRPCClient(rpcAuthMethod: BitcoinJsonRPCAuthMethod, host: String = "127.0.0.1", port: Int = 8332, ssl: Boolean = false, wallet: Option[String] = None)(implicit sb: SttpBackend[Future, _]) extends BitcoinJsonRPCClient {

implicit val formats = DefaultFormats.withBigDecimal + ByteVector32Serializer + ByteVector32KmpSerializer
implicit val formats: Formats = DefaultFormats.withBigDecimal + ByteVector32Serializer + ByteVector32KmpSerializer

private val scheme = if (ssl) "https" else "http"
private val serviceUri = wallet match {
case Some(name) => uri"$scheme://$host:$port/wallet/$name"
case None => uri"$scheme://$host:$port"
}
private val credentials = new AtomicReference[BitcoinJsonRPCCredentials](rpcAuthMethod.credentials)
implicit val serialization = Serialization
implicit val serialization: JacksonSerialization = Serialization

override def invoke(method: String, params: Any*)(implicit ec: ExecutionContext): Future[JValue] =
invoke(Seq(JsonRPCRequest(method = method, params = params))).map(l => jsonResponse2Exception(l.head).result)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ package fr.acinq.eclair.blockchain.fee

import fr.acinq.bitcoin.scalacompat._
import fr.acinq.eclair.blockchain.bitcoind.rpc.BitcoinJsonRPCClient
import org.json4s.DefaultFormats
import org.json4s.JsonAST._
import org.json4s.{DefaultFormats, Formats}

import scala.concurrent.{ExecutionContext, Future}

Expand All @@ -28,7 +28,7 @@ import scala.concurrent.{ExecutionContext, Future}
*/
case class BitcoinCoreFeeProvider(rpcClient: BitcoinJsonRPCClient, defaultFeerates: FeeratesPerKB)(implicit ec: ExecutionContext) extends FeeProvider {

implicit val formats = DefaultFormats.withBigDecimal
implicit val formats: Formats = DefaultFormats.withBigDecimal

/**
* We need this to keep commitment tx fees in sync with the state of the network
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ import sttp.client3.okhttp.OkHttpFutureBackend
import java.io.File
import java.nio.file.Files
import scala.concurrent.ExecutionContext.Implicits.global
import scala.concurrent.Future
import scala.concurrent.duration._
import scala.io.Source

Expand All @@ -44,7 +45,7 @@ trait BitcoindService extends Logging {
import scala.sys.process._

implicit val system: ActorSystem
implicit val sttpBackend = OkHttpFutureBackend()
implicit val sttpBackend: sttp.client3.SttpBackend[Future, sttp.capabilities.WebSockets] = OkHttpFutureBackend()

val defaultWallet: String = "miner"
val bitcoindPort: Int = TestUtils.availablePort
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,13 @@ import fr.acinq.eclair.blockchain.watchdogs.BlockchainWatchdog.LatestHeaders
import fr.acinq.eclair.blockchain.watchdogs.ExplorerApi.{BlockcypherExplorer, BlockstreamExplorer, CheckLatestHeaders, MempoolSpaceExplorer}
import fr.acinq.eclair.{BlockHeight, TestTags}
import org.scalatest.funsuite.AnyFunSuiteLike
import sttp.client3.SttpBackend

import scala.concurrent.Future

class ExplorerApiSpec extends ScalaTestWithActorTestKit(ConfigFactory.load("application")) with AnyFunSuiteLike {

implicit val sttpBackend = ExplorerApi.createSttpBackend(None)
implicit val sttpBackend: SttpBackend[Future, _] = ExplorerApi.createSttpBackend(None)

val explorers = Seq(BlockcypherExplorer(), BlockstreamExplorer(useTorEndpoints = false), MempoolSpaceExplorer(useTorEndpoints = false))

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import scodec.bits.{ByteVector, _}
* Created by fabrice on 12/12/16.
*/
object NoiseDemo extends App {
implicit val system = ActorSystem("test")
implicit val system: ActorSystem = ActorSystem("test")

class NoiseHandler(keyPair: KeyPair, rs: Option[ByteVector], them: ActorRef, isWriter: Boolean, listenerFactory: => ActorRef) extends Actor with Stash {
// initiator must know pubkey (i.e long-term ID) of responder
Expand Down
14 changes: 4 additions & 10 deletions eclair-front/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>3.2.0</version>
<version>3.6.0</version>
<configuration>
<finalName>${project.name}-${project.version}-${git.commit.id.abbrev}</finalName>
<descriptors>
Expand Down Expand Up @@ -85,13 +85,13 @@
<dependency>
<groupId>org.codehaus.janino</groupId>
<artifactId>janino</artifactId>
<version>3.1.2</version>
<version>3.1.10</version>
</dependency>
<!-- key management -->
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-secretsmanager</artifactId>
<version>1.11.776</version>
<version>1.12.504</version>
</dependency>
<!-- metrics -->
<dependency>
Expand All @@ -113,7 +113,7 @@
<dependency>
<groupId>io.kamon</groupId>
<artifactId>kanela-agent</artifactId>
<version>1.0.5</version>
<version>1.0.17</version>
</dependency>
<!-- tests -->
<dependency>
Expand All @@ -136,11 +136,5 @@
<version>${akka.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.opentable.components</groupId>
<artifactId>otj-pg-embedded</artifactId>
<version>0.13.3</version>
<scope>test</scope>
</dependency>
</dependencies>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ import scala.concurrent.{ExecutionContext, Future, Promise}

class FrontSetup(datadir: File)(implicit system: ActorSystem) extends Logging {

implicit val timeout = Timeout(30 seconds)
implicit val timeout: Timeout = Timeout(30 seconds)
implicit val ec: ExecutionContext = system.dispatcher

logger.info(s"hello!")
Expand Down
6 changes: 3 additions & 3 deletions eclair-node/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>3.2.0</version>
<version>3.6.0</version>
<configuration>
<finalName>${project.name}-${project.version}-${git.commit.id.abbrev}</finalName>
<descriptors>
Expand Down Expand Up @@ -85,7 +85,7 @@
<!--conditional logging -->
<groupId>org.codehaus.janino</groupId>
<artifactId>janino</artifactId>
<version>3.0.7</version>
<version>3.1.10</version>
</dependency>
<!-- http server -->
<dependency>
Expand Down Expand Up @@ -147,7 +147,7 @@
<dependency>
<groupId>io.kamon</groupId>
<artifactId>kanela-agent</artifactId>
<version>1.0.5</version>
<version>1.0.17</version>
</dependency>
</dependencies>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ trait WebSocket {
// register an actor that feeds the queue on payment related events
actorSystem.actorOf(Props(new Actor {

override def preStart: Unit = {
override def preStart(): Unit = {
context.system.eventStream.subscribe(self, classOf[PaymentEvent])
context.system.eventStream.subscribe(self, classOf[ChannelCreated])
context.system.eventStream.subscribe(self, classOf[ChannelOpened])
Expand Down
Loading

0 comments on commit 3e43611

Please sign in to comment.