Skip to content

Commit

Permalink
Bumped dependencies (#3987)
Browse files Browse the repository at this point in the history
  • Loading branch information
phearnot authored Feb 10, 2025
1 parent a82b23c commit f57e198
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 15 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ The code in this project is licensed under [MIT license](./LICENSE)

## 👏 Acknowledgements

![YourKit Logo](https://www.yourkit.com/images/yklogo.png)
[<img src="https://www.yourkit.com/images/yklogo.png">](https://www.yourkit.com)

We use YourKit full-featured Java Profiler to make Waves node faster. YourKit, LLC is the creator of innovative and intelligent tools for profiling Java and .NET applications.

Expand Down
2 changes: 2 additions & 0 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ git.uncommittedSignifier := Some("DIRTY")
ThisBuild / git.useGitDescribe := true
ThisBuild / PB.protocVersion := "3.25.6" // https://protobuf.dev/support/version-support/#java

ThisBuild / dependencyOverrides ++= Dependencies.overrides

lazy val lang =
crossProject(JSPlatform, JVMPlatform)
.withoutSuffixFor(JVMPlatform)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import com.wavesplatform.settings.GRPCSettings
import com.wavesplatform.utils.ScorexLogging
import io.grpc.Server
import io.grpc.netty.NettyServerBuilder
import io.grpc.protobuf.services.ProtoReflectionService
import io.grpc.protobuf.services.ProtoReflectionServiceV1
import monix.execution.Scheduler
import pureconfig.ConfigSource

Expand All @@ -16,7 +16,8 @@ import scala.concurrent.Future

class GRPCServerExtension(context: ExtensionContext) extends Extension with ScorexLogging {
private val settings = ConfigSource.fromConfig(context.settings.config).at("waves.grpc").loadOrThrow[GRPCSettings]
private val executor = Executors.newFixedThreadPool(settings.workerThreads, new ThreadFactoryBuilder().setDaemon(true).setNameFormat("grpc-server-worker-%d").build())
private val executor =
Executors.newFixedThreadPool(settings.workerThreads, new ThreadFactoryBuilder().setDaemon(true).setNameFormat("grpc-server-worker-%d").build())
private implicit val apiScheduler: Scheduler = Scheduler(executor)
private val bindAddress = new InetSocketAddress(settings.host, settings.port)
private val server: Server = NettyServerBuilder
Expand All @@ -27,7 +28,7 @@ class GRPCServerExtension(context: ExtensionContext) extends Extension with Scor
.addService(AccountsApiGrpc.bindService(new AccountsApiGrpcImpl(context.accountsApi), apiScheduler))
.addService(AssetsApiGrpc.bindService(new AssetsApiGrpcImpl(context.assetsApi, context.accountsApi), apiScheduler))
.addService(BlockchainApiGrpc.bindService(new BlockchainApiGrpcImpl(context.blockchain, context.settings.featuresSettings), apiScheduler))
.addService(ProtoReflectionService.newInstance())
.addService(ProtoReflectionServiceV1.newInstance())
.build()

override def start(): Unit = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import com.wavesplatform.extensions.{Context, Extension}
import com.wavesplatform.state.{Blockchain, StateSnapshot}
import com.wavesplatform.utils.{Schedulers, ScorexLogging}
import io.grpc.netty.NettyServerBuilder
import io.grpc.protobuf.services.ProtoReflectionService
import io.grpc.protobuf.services.ProtoReflectionServiceV1
import io.grpc.{Metadata, Server, ServerStreamTracer, Status}
import monix.execution.schedulers.SchedulerService
import monix.execution.{ExecutionModel, Scheduler, UncaughtExceptionReporter}
Expand All @@ -30,8 +30,8 @@ class BlockchainUpdates(private val context: Context) extends Extension with Sco
ExecutionModel.Default,
rejectedExecutionHandler = new akka.dispatch.SaneRejectedExecutionHandler
)
private val rdb = RocksDB.open(context.settings.directory + "/blockchain-updates")
private val repo = new Repo(rdb, context.blocksApi)
private val rdb = RocksDB.open(context.settings.directory + "/blockchain-updates")
private val repo = new Repo(rdb, context.blocksApi)

private val grpcServer: Server = NettyServerBuilder
.forAddress(new InetSocketAddress("0.0.0.0", settings.grpcPort))
Expand All @@ -51,7 +51,7 @@ class BlockchainUpdates(private val context: Context) extends Extension with Sco
}
)
.addService(BlockchainUpdatesApiGrpc.bindService(repo, scheduler))
.addService(ProtoReflectionService.newInstance())
.addService(ProtoReflectionServiceV1.newInstance())
.build()

override def start(): Unit = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import com.wavesplatform.it.NodeConfigs
import com.wavesplatform.it.NodeConfigs.Default
import com.wavesplatform.it.sync.grpc.GrpcBaseTransactionSuite
import io.grpc.{CallOptions, ManagedChannelBuilder}
import io.grpc.reflection.v1alpha.ServerReflectionGrpc.getServerReflectionInfoMethod
import io.grpc.reflection.v1alpha.ServerReflectionRequest
import io.grpc.reflection.v1.ServerReflectionGrpc.getServerReflectionInfoMethod
import io.grpc.reflection.v1.ServerReflectionRequest
import io.grpc.stub.ClientCalls

import scala.util.Try
Expand Down
24 changes: 19 additions & 5 deletions project/Dependencies.scala
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,20 @@ import scalapb.compiler.Version.scalapbVersion

//noinspection TypeAnnotation
object Dependencies {
private def nettyModule(module: String) = "io.netty" % s"netty-$module" % "4.1.117.Final"

val overrides = Seq(
"com.google.code.gson" % "gson" % "2.12.1",
"com.squareup.okio" % "okio-jvm" % "3.10.2",
"org.apache.httpcomponents" % "httpclient" % "4.5.14",
nettyModule("codec-http2"),
nettyModule("codec-http"),
nettyModule("handler-proxy"),
nettyModule("codec-socks"),
nettyModule("transport-native-unix-common"),
nettyModule("resolver-dns")
)

// Node protobuf schemas
private[this] val protoSchemasLib =
"com.wavesplatform" % "protobuf-schemas" % "1.5.2" classifier "protobuf-src" intransitive ()
Expand All @@ -20,7 +34,7 @@ object Dependencies {

def monixModule(module: String): Def.Initialize[ModuleID] = Def.setting("io.monix" %%% s"monix-$module" % "3.4.1")

private def grpcModule(module: String) = "io.grpc" % module % "1.68.0"
private def grpcModule(module: String) = "io.grpc" % module % "1.70.0"

val akkaHttp = akkaHttpModule("akka-http")
val googleGuava = "com.google.guava" % "guava" % "33.4.0-jre"
Expand All @@ -30,15 +44,15 @@ object Dependencies {
val janino = "org.codehaus.janino" % "janino" % "3.1.12"
val asyncHttpClient = "org.asynchttpclient" % "async-http-client" % "3.0.1"
val curve25519 = "com.wavesplatform" % "curve25519-java" % "0.6.6"
val nettyHandler = "io.netty" % "netty-handler" % "4.1.116.Final"
val nettyHandler = nettyModule("handler")

val playJson = "org.playframework" %% "play-json" % "3.0.4"

val scalaTest = "org.scalatest" %% "scalatest" % "3.2.19" % Test
val scalaJsTest = Def.setting("com.lihaoyi" %%% "utest" % "0.8.5" % Test)

val sttp3 = "com.softwaremill.sttp.client3" %% "core" % "3.10.2"
val sttp3Monix = "com.softwaremill.sttp.client3" %% "monix" % "3.10.2"
val sttp3 = "com.softwaremill.sttp.client3" %% "core" % "3.10.3"
val sttp3Monix = "com.softwaremill.sttp.client3" %% "monix" % "3.10.3"

val bouncyCastleProvider = "org.bouncycastle" % s"bcprov-jdk18on" % "1.80"

Expand Down Expand Up @@ -74,7 +88,7 @@ object Dependencies {
"org.scalatestplus" %% "scalacheck-1-16" % "3.2.14.0",
"org.scalacheck" %% "scalacheck" % "1.18.1",
"org.mockito" % "mockito-all" % "1.10.19",
"org.scalamock" %% "scalamock" % "6.1.1"
"org.scalamock" %% "scalamock" % "6.2.0"
).map(_ % Test)

lazy val qaseReportDeps = Seq(
Expand Down

0 comments on commit f57e198

Please sign in to comment.