Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NODE-2604 New zwaves library #3895

Merged
merged 5 commits into from
Oct 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,7 @@ inScope(Global)(
testOptions += Tests.Setup(_ => sys.props("sbt-testing") = "true"),
network := Network.default(),
instrumentation := false,
resolvers ++= Resolver.sonatypeOssRepos("snapshots") ++ Seq(Resolver.mavenLocal) ++
Seq(MavenRepository("wvservices-releases", "https://nexus.wvservices.com/repository/maven-releases/")),
resolvers ++= Resolver.sonatypeOssRepos("releases") ++ Resolver.sonatypeOssRepos("snapshots") ++ Seq(Resolver.mavenLocal),
Compile / doc / sources := Seq.empty,
Compile / packageDoc / publishArtifact := false,
concurrentRestrictions := Seq(Tags.limit(Tags.Test, math.min(EvaluateTask.SystemProcessors, 8))),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,9 @@
package com.wavesplatform.crypto

import java.lang.reflect.Constructor

import org.whispersystems.curve25519.OpportunisticCurve25519Provider

object Curve25519 {
private lazy val provider: OpportunisticCurve25519Provider = {
val constructor = classOf[OpportunisticCurve25519Provider].getDeclaredConstructors.head
.asInstanceOf[Constructor[OpportunisticCurve25519Provider]]
constructor.setAccessible(true)
constructor.newInstance()
}
private lazy val provider = new OpportunisticCurve25519Provider()

val KeyLength: Int = 32

Expand Down
11 changes: 7 additions & 4 deletions node/src/test/scala/com/wavesplatform/http/UtilsRouteSpec.scala
Original file line number Diff line number Diff line change
Expand Up @@ -576,10 +576,13 @@ class UtilsRouteSpec extends RouteSpec("/utils") with RestAPISettingsHelper with
}

Post(routePath("/script/compileCode?compact=true"), bigSizeDApp) ~> route ~> check {
(responseAs[JsValue] \ "script").toOption shouldBe defined
(responseAs[JsValue] \ "complexity").as[Long] shouldBe 0
(responseAs[JsValue] \ "verifierComplexity").as[Long] shouldBe 0
(responseAs[JsValue] \ "extraFee").as[Long] shouldBe 400000
val r = responseAs[JsValue]
withClue(s"json=$r ") {
(r \ "script").toOption shouldBe defined
(r \ "complexity").as[Long] shouldBe 0
(r \ "verifierComplexity").as[Long] shouldBe 0
(r \ "extraFee").as[Long] shouldBe 400000
}
}

Post(routePath("/script/compileCode"), "{-# STDLIB_VERSION 2 #-}\n(1 == 2)") ~> route ~> check {
Expand Down
6 changes: 3 additions & 3 deletions project/Dependencies.scala
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ object Dependencies {
val logback = "ch.qos.logback" % "logback-classic" % "1.3.11" // 1.4.x and later is built for Java 11
val janino = "org.codehaus.janino" % "janino" % "3.1.10"
val asyncHttpClient = "org.asynchttpclient" % "async-http-client" % "2.12.3"
val curve25519 = "com.wavesplatform" % "curve25519-java" % "0.6.5"
val curve25519 = "com.wavesplatform" % "curve25519-java" % "0.6.6"
val nettyHandler = "io.netty" % "netty-handler" % "4.1.94.Final"

val catsCore = catsModule("core", "2.9.0")
Expand Down Expand Up @@ -66,10 +66,10 @@ object Dependencies {
shapeless.value,
"org.typelevel" %%% "cats-mtl" % "1.3.1",
"ch.obermuhlner" % "big-math" % "2.3.2",
googleGuava,
curve25519,
bouncyCastleProvider,
"com.wavesplatform" % "zwaves" % "0.1.0-SNAPSHOT",
"com.wavesplatform" % "zwaves-bn256" % "0.1.5-SNAPSHOT",
"com.wavesplatform" % "zwaves" % "0.2.1",
web3jModule("crypto")
) ++ langCompilerPlugins.value ++ scalapbRuntime.value ++ protobuf.value
)
Expand Down