From 004f3a90910f0da481387518cb9b3440f66c6a01 Mon Sep 17 00:00:00 2001 From: Artyom Sayadyan Date: Mon, 27 Nov 2023 02:51:36 +0300 Subject: [PATCH 1/3] NODE-2631 Java 11 --- .github/workflows/check-pr.yaml | 2 +- README.md | 10 ++-- benchmark/build.sbt | 2 +- build.sbt | 2 +- docker/node-sbt-builder.Dockerfile | 2 +- .../lang/v1/parser/BinaryOperation.scala | 1 + .../wavesplatform/lang/v1/parser/Parser.scala | 3 +- .../lang/v1/parser/UnaryOperation.scala | 1 + project/Dependencies.scala | 48 +++++++++---------- project/plugins.sbt | 4 +- 10 files changed, 38 insertions(+), 37 deletions(-) diff --git a/.github/workflows/check-pr.yaml b/.github/workflows/check-pr.yaml index b14e3f1e00d..3bc81c7e954 100644 --- a/.github/workflows/check-pr.yaml +++ b/.github/workflows/check-pr.yaml @@ -15,7 +15,7 @@ jobs: - uses: actions/setup-java@v3 with: distribution: 'zulu' - java-version: '8' + java-version: '11' - name: Cache SBT uses: actions/cache@v3 with: diff --git a/README.md b/README.md index b534ebb95ab..7776c20a6f9 100644 --- a/README.md +++ b/README.md @@ -58,17 +58,17 @@ A quick introduction of the minimal setup you need to get a running node. Linux systems: ```bash sudo apt-get update -sudo apt-get install openjdk-8-jre +sudo apt-get install openjdk-11-jre java -jar node/target/waves-all*.jar path/to/config/waves-{network}.conf ``` Mac systems (assuming already installed homebrew): ```bash -brew cask install adoptopenjdk/openjdk/adoptopenjdk8 +brew cask install adoptopenjdk/openjdk/adoptopenjdk11 java -jar node/target/waves-all*.jar path/to/config/waves-{network}.conf ``` -Windows systems (assuming already installed OpenJDK 8): +Windows systems (assuming already installed OpenJDK 11): ```bash java -jar node/target/waves-all*.jar path/to/config/waves-{network}.conf ``` @@ -97,9 +97,9 @@ To build and test this project, you will have to follow these steps: ```bash sudo apt-get update -sudo apt-get install openjdk-8-jre # Ubuntu +sudo apt-get install openjdk-11-jre # Ubuntu # or -# brew cask install adoptopenjdk/openjdk/adoptopenjdk8 # Mac +# brew cask install adoptopenjdk/openjdk/adoptopenjdk11 # Mac ``` - Install SBT (Scala Build Tool) diff --git a/benchmark/build.sbt b/benchmark/build.sbt index fb9b5a66ff7..c2e086488da 100644 --- a/benchmark/build.sbt +++ b/benchmark/build.sbt @@ -1,6 +1,6 @@ enablePlugins(JmhPlugin) -Jmh / version := "1.33" +Jmh / version := "1.37" libraryDependencies ++= Seq( "org.scodec" %% "scodec-core" % "1.11.10", diff --git a/build.sbt b/build.sbt index e5b1187c2d2..b25426b4969 100644 --- a/build.sbt +++ b/build.sbt @@ -13,7 +13,7 @@ enablePlugins(GitVersioning) git.uncommittedSignifier := Some("DIRTY") git.useGitDescribe := true ThisBuild / git.useGitDescribe := true -ThisBuild / PB.protocVersion := "3.24.4" // https://protobuf.dev/support/version-support/#java +ThisBuild / PB.protocVersion := "3.25.1" // https://protobuf.dev/support/version-support/#java lazy val lang = crossProject(JSPlatform, JVMPlatform) diff --git a/docker/node-sbt-builder.Dockerfile b/docker/node-sbt-builder.Dockerfile index 038589c20b5..7707e3f8521 100644 --- a/docker/node-sbt-builder.Dockerfile +++ b/docker/node-sbt-builder.Dockerfile @@ -1,4 +1,4 @@ -FROM eclipse-temurin:8-jdk-jammy +FROM eclipse-temurin:11-jdk-jammy ARG WAVES_VERSION ARG SBT_VERSION diff --git a/lang/shared/src/main/scala/com/wavesplatform/lang/v1/parser/BinaryOperation.scala b/lang/shared/src/main/scala/com/wavesplatform/lang/v1/parser/BinaryOperation.scala index 9adfa106971..a552017657c 100644 --- a/lang/shared/src/main/scala/com/wavesplatform/lang/v1/parser/BinaryOperation.scala +++ b/lang/shared/src/main/scala/com/wavesplatform/lang/v1/parser/BinaryOperation.scala @@ -2,6 +2,7 @@ package com.wavesplatform.lang.v1.parser import com.wavesplatform.lang.v1.parser.Expressions.* import fastparse.* +import fastparse.MultiLineWhitespace.* sealed abstract class BinaryOperation { val func: String diff --git a/lang/shared/src/main/scala/com/wavesplatform/lang/v1/parser/Parser.scala b/lang/shared/src/main/scala/com/wavesplatform/lang/v1/parser/Parser.scala index 40cbc52a390..2322e5808ae 100644 --- a/lang/shared/src/main/scala/com/wavesplatform/lang/v1/parser/Parser.scala +++ b/lang/shared/src/main/scala/com/wavesplatform/lang/v1/parser/Parser.scala @@ -139,8 +139,7 @@ class Parser(stdLibVersion: StdLibVersion)(implicit offset: LibrariesOffset) { } def invalid[A: P]: P[INVALID] = { - import fastparse.NoWhitespace.* - P(Index ~~ CharPred(_ != '\n').rep(1) ~~ Index) + P(Index ~~ CharPred(_ != '\n').repX(1) ~~ Index) .map { case (start, end) => INVALID(Pos(start, end), "can't parse the expression") } diff --git a/lang/shared/src/main/scala/com/wavesplatform/lang/v1/parser/UnaryOperation.scala b/lang/shared/src/main/scala/com/wavesplatform/lang/v1/parser/UnaryOperation.scala index 2e1a999d2e5..dd0496cdf45 100644 --- a/lang/shared/src/main/scala/com/wavesplatform/lang/v1/parser/UnaryOperation.scala +++ b/lang/shared/src/main/scala/com/wavesplatform/lang/v1/parser/UnaryOperation.scala @@ -3,6 +3,7 @@ package com.wavesplatform.lang.v1.parser import com.wavesplatform.lang.v1.parser.Expressions.* import com.wavesplatform.lang.v1.parser.Parser.LibrariesOffset import fastparse.* +import fastparse.MultiLineWhitespace.* sealed abstract class UnaryOperation { val func: String diff --git a/project/Dependencies.scala b/project/Dependencies.scala index c5ca5a3c525..e23ec49234a 100644 --- a/project/Dependencies.scala +++ b/project/Dependencies.scala @@ -8,15 +8,15 @@ object Dependencies { private[this] val protoSchemasLib = "com.wavesplatform" % "protobuf-schemas" % "1.5.1-84-SNAPSHOT" classifier "protobuf-src" intransitive () - private def akkaModule(module: String) = "com.typesafe.akka" %% s"akka-$module" % "2.6.21" + private def akkaModule(module: String) = "com.typesafe.akka" %% s"akka-$module" % "2.8.5" - private def akkaHttpModule(module: String) = "com.typesafe.akka" %% module % "10.2.10" + private def akkaHttpModule(module: String) = "com.typesafe.akka" %% module % "10.5.3" - private def kamonModule(module: String) = "io.kamon" %% s"kamon-$module" % "2.6.5" + private def kamonModule(module: String) = "io.kamon" %% s"kamon-$module" % "2.6.6" private def jacksonModule(group: String, module: String) = s"com.fasterxml.jackson.$group" % s"jackson-$module" % "2.15.3" - private def web3jModule(module: String) = "org.web3j" % module % "4.9.8" // https://github.com/web3j/web3j/issues/1907 + private def web3jModule(module: String) = "org.web3j" % module % "4.9.8" // 4.10+ requires Java 17 https://github.com/web3j/web3j/issues/1907 def monixModule(module: String): Def.Initialize[ModuleID] = Def.setting("io.monix" %%% s"monix-$module" % "3.4.1") @@ -26,21 +26,21 @@ object Dependencies { val googleGuava = "com.google.guava" % "guava" % "32.1.3-jre" val kamonCore = kamonModule("core") val machinist = "org.typelevel" %% "machinist" % "0.6.8" - val logback = "ch.qos.logback" % "logback-classic" % "1.3.11" // 1.4.x and later is built for Java 11 + val logback = "ch.qos.logback" % "logback-classic" % "1.4.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.6" - val nettyHandler = "io.netty" % "netty-handler" % "4.1.100.Final" + val nettyHandler = "io.netty" % "netty-handler" % "4.1.101.Final" val shapeless = Def.setting("com.chuusai" %%% "shapeless" % "2.3.10") - val playJson = "com.typesafe.play" %% "play-json" % "2.9.4" // 2.10.x and later is built for Java 11 + val playJson = "com.typesafe.play" %% "play-json" % "2.10.3" // 2.10.x and later is built for Java 11 val scalaTest = "org.scalatest" %% "scalatest" % "3.2.17" % Test - val scalaJsTest = Def.setting("com.lihaoyi" %%% "utest" % "0.8.1" % Test) + val scalaJsTest = Def.setting("com.lihaoyi" %%% "utest" % "0.8.2" % Test) - val sttp3 = "com.softwaremill.sttp.client3" % "core_2.13" % "3.5.2" // 3.6.x and later is built for Java 11 - val sttp3Monix = "com.softwaremill.sttp.client3" %% "monix" % "3.5.2" + val sttp3 = "com.softwaremill.sttp.client3" % "core_2.13" % "3.9.1" // 3.6.x and later is built for Java 11 + val sttp3Monix = "com.softwaremill.sttp.client3" %% "monix" % "3.9.1" val bouncyCastleProvider = "org.bouncycastle" % s"bcprov-jdk15on" % "1.70" @@ -59,9 +59,9 @@ object Dependencies { // explicit dependency can likely be removed when monix 3 is released monixModule("eval").value, "org.typelevel" %%% s"cats-core" % "2.10.0", - "com.lihaoyi" %%% "fastparse" % "2.3.3", + "com.lihaoyi" %%% "fastparse" % "3.0.2", shapeless.value, - "org.typelevel" %%% "cats-mtl" % "1.3.1", + "org.typelevel" %%% "cats-mtl" % "1.4.0", "ch.obermuhlner" % "big-math" % "2.3.2", googleGuava, // BaseEncoding.base16() curve25519, @@ -74,7 +74,7 @@ object Dependencies { lazy val it = scalaTest +: Seq( logback, "com.spotify" % "docker-client" % "8.16.0", - "com.fasterxml.jackson.dataformat" % "jackson-dataformat-properties" % "2.14.2", + "com.fasterxml.jackson.dataformat" % "jackson-dataformat-properties" % "2.16.0", asyncHttpClient ).map(_ % Test) @@ -99,7 +99,7 @@ object Dependencies { private[this] val dbDeps = Seq( - "org.rocksdb" % "rocksdbjni" % "8.5.4" + "org.rocksdb" % "rocksdbjni" % "8.8.1" ) lazy val node = Def.setting( @@ -127,14 +127,14 @@ object Dependencies { "com.typesafe.scala-logging" %% "scala-logging" % "3.9.5", "eu.timepit" %% "refined" % "0.11.0" exclude ("org.scala-lang.modules", "scala-xml_2.13"), "eu.timepit" %% "refined-cats" % "0.11.0" exclude ("org.scala-lang.modules", "scala-xml_2.13"), - "com.esaulpaugh" % "headlong" % "9.4.0", + "com.esaulpaugh" % "headlong" % "10.0.1", web3jModule("abi"), akkaModule("testkit") % Test, akkaHttpModule("akka-http-testkit") % Test ) ++ test ++ console ++ logDeps ++ dbDeps ++ protobuf.value ++ langCompilerPlugins.value ) - val gProto = "com.google.protobuf" % "protobuf-java" % "3.24.4" + val gProto = "com.google.protobuf" % "protobuf-java" % "3.25.1" lazy val scalapbRuntime = Def.setting( Seq( @@ -158,12 +158,12 @@ object Dependencies { lazy val rideRunner = Def.setting( Seq( - "org.rocksdb" % "rocksdbjni" % "8.3.2", - "com.thesamet.scalapb" %% "scalapb-json4s" % "0.11.1", + "org.rocksdb" % "rocksdbjni" % "8.8.1", + "com.thesamet.scalapb" %% "scalapb-json4s" % "0.12.1", // https://github.com/netty/netty/wiki/Native-transports // "io.netty" % "netty-transport-native-epoll" % "4.1.79.Final" classifier "linux-x86_64", - "com.github.ben-manes.caffeine" % "caffeine" % "3.1.2", - "net.logstash.logback" % "logstash-logback-encoder" % "7.2" % Runtime, + "com.github.ben-manes.caffeine" % "caffeine" % "3.1.8", + "net.logstash.logback" % "logstash-logback-encoder" % "7.4" % Runtime, "org.ehcache" % "sizeof" % "0.4.3", // Weighing caches kamonModule("caffeine"), kamonModule("prometheus"), @@ -171,9 +171,9 @@ object Dependencies { sttp3Monix, "org.scala-lang.modules" %% "scala-xml" % "2.2.0", // JUnit reports akkaHttpModule("akka-http-testkit") % Test, - "com.softwaremill.diffx" %% "diffx-core" % "0.8.3" % Test, - "com.softwaremill.diffx" %% "diffx-scalatest-should" % "0.8.3" % Test, - "io.grpc" % "grpc-inprocess" % scalapb.compiler.Version.grpcJavaVersion % Test + "com.softwaremill.diffx" %% "diffx-core" % "0.9.0" % Test, + "com.softwaremill.diffx" %% "diffx-scalatest-should" % "0.9.0" % Test, + "io.grpc" % "grpc-inprocess" % "1.59.0" % Test ) ++ Dependencies.console ++ Dependencies.logDeps ++ Dependencies.test ) @@ -189,5 +189,5 @@ object Dependencies { // https://github.com/sbt/sbt-javaagent#scopes // dist (only sbt-native-packager), because causes using logs before needed, so System.setProperty in RideRunnerWithPreparedStateApp has no effect. lazy val kanela = - Seq("io.kamon" % "kanela-agent" % "1.0.17" % "dist") + Seq("io.kamon" % "kanela-agent" % "1.0.18" % "dist") } diff --git a/project/plugins.sbt b/project/plugins.sbt index 94eeb1a889c..0d0b022093b 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -9,7 +9,7 @@ addSbtPlugin("com.thesamet" % "sbt-protoc" % "1.0.6") libraryDependencies += "com.thesamet.scalapb" %% "compilerplugin" % "0.11.14" Seq( - "com.eed3si9n" % "sbt-assembly" % "2.1.3", + "com.eed3si9n" % "sbt-assembly" % "2.1.5", "com.github.sbt" % "sbt-native-packager" % "1.9.16", "se.marcuslonnberg" % "sbt-docker" % "1.11.0", "org.scala-js" % "sbt-scalajs" % "1.14.0", @@ -20,7 +20,7 @@ Seq( ).map(addSbtPlugin) libraryDependencies ++= Seq( - "com.fasterxml.jackson.module" %% "jackson-module-scala" % "2.15.3", + "com.fasterxml.jackson.module" %% "jackson-module-scala" % "2.16.0", "org.hjson" % "hjson" % "3.1.0", "org.vafer" % "jdeb" % "1.10" artifacts Artifact("jdeb", "jar", "jar"), "org.slf4j" % "jcl-over-slf4j" % "2.0.9", From 668631f56b169cf8bab488fe1642372fdd74fa74 Mon Sep 17 00:00:00 2001 From: Artyom Sayadyan Date: Mon, 27 Nov 2023 03:22:27 +0300 Subject: [PATCH 2/3] Updated debianPackageDependencies --- node/build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/node/build.sbt b/node/build.sbt index 6317232b8cb..334c0ba0840 100644 --- a/node/build.sbt +++ b/node/build.sbt @@ -155,7 +155,7 @@ inConfig(Debian)( maintainer := "com.wavesplatform", packageSource := sourceDirectory.value / "package", linuxStartScriptTemplate := (packageSource.value / "systemd.service").toURI.toURL, - debianPackageDependencies += "java8-runtime-headless", + debianPackageDependencies += "java11-runtime-headless", maintainerScripts := maintainerScriptsFromDirectory(packageSource.value / "debian", Seq("postinst", "postrm", "prerm")) ) ) From 0ef8eddf8b3ebafebcb5339a82b96d54cfe048e2 Mon Sep 17 00:00:00 2001 From: Artyom Sayadyan Date: Mon, 27 Nov 2023 03:24:18 +0300 Subject: [PATCH 3/3] Adapted DebugApiRouteSpec --- .../http/DebugApiRouteSpec.scala | 286 +++++++++--------- 1 file changed, 143 insertions(+), 143 deletions(-) diff --git a/node/src/test/scala/com/wavesplatform/http/DebugApiRouteSpec.scala b/node/src/test/scala/com/wavesplatform/http/DebugApiRouteSpec.scala index 29089460466..6f1e5923992 100644 --- a/node/src/test/scala/com/wavesplatform/http/DebugApiRouteSpec.scala +++ b/node/src/test/scala/com/wavesplatform/http/DebugApiRouteSpec.scala @@ -3316,7 +3316,7 @@ class DebugApiRouteSpec } "InvokeExpression" in { - def assert(wavesSettings: WavesSettings): Assertion = { + def assert(wavesSettings: WavesSettings, error: Option[String]): Assertion = { val blockchain = createBlockchainStub { blockchain => val settings = wavesSettings.blockchainSettings.functionalitySettings (() => blockchain.settings).when().returns(WavesSettings.default().blockchainSettings.copy(functionalitySettings = settings)) @@ -3337,151 +3337,151 @@ class DebugApiRouteSpec val invokeExpression = TxHelpers.invokeExpression(expression) jsonPost(routePath("/validate"), invokeExpression.json()) ~> route ~> check { val json = responseAs[JsValue] - (json \ "expression").as[String] shouldBe expression.bytes.value().base64 - (json \ "valid").as[Boolean] shouldBe true - (json \ "trace").as[JsArray] should matchJson( - s""" - |[ { - | "type" : "dApp", - | "id" : "3MtGzgmNa5fMjGCcPi5nqMTdtZkfojyWHL9", - | "function" : "default", - | "args" : [ ], - | "invocations" : [ ], - | "result" : { - | "data" : [ ], - | "transfers" : [ ], - | "issues" : [ ], - | "reissues" : [ { - | "assetId" : "5PjDJaGfSPJj4tFzMRCiuuAasKg5n8dJKXKenhuwZexx", - | "isReissuable" : true, - | "quantity" : 1 - | } ], - | "burns" : [ ], - | "sponsorFees" : [ ], - | "leases" : [ ], - | "leaseCancels" : [ ], - | "invokes" : [ ] - | }, - | "error" : null, - | "vars" : [ { - | "name" : "i", - | "type" : "Invocation", - | "value" : { - | "originCaller" : { - | "type" : "Address", - | "value" : { - | "bytes" : { - | "type" : "ByteVector", - | "value" : "3MtGzgmNa5fMjGCcPi5nqMTdtZkfojyWHL9" - | } - | } - | }, - | "payments" : { - | "type" : "Array", - | "value" : [ ] - | }, - | "callerPublicKey" : { - | "type" : "ByteVector", - | "value" : "9BUoYQYq7K38mkk61q8aMH9kD9fKSVL1Fib7FbH6nUkQ" - | }, - | "feeAssetId" : { - | "type" : "Unit", - | "value" : { } - | }, - | "originCallerPublicKey" : { - | "type" : "ByteVector", - | "value" : "9BUoYQYq7K38mkk61q8aMH9kD9fKSVL1Fib7FbH6nUkQ" - | }, - | "transactionId" : { - | "type" : "ByteVector", - | "value" : "${invokeExpression.id()}" - | }, - | "caller" : { - | "type" : "Address", - | "value" : { - | "bytes" : { - | "type" : "ByteVector", - | "value" : "3MtGzgmNa5fMjGCcPi5nqMTdtZkfojyWHL9" - | } - | } - | }, - | "fee" : { - | "type" : "Int", - | "value" : 1000000 - | } - | } - | }, { - | "name" : "default.@args", - | "type" : "Array", - | "value" : [ ] - | }, { - | "name" : "assetId", - | "type" : "ByteVector", - | "value" : "5PjDJaGfSPJj4tFzMRCiuuAasKg5n8dJKXKenhuwZexx" - | }, { - | "name" : "Reissue.@args", - | "type" : "Array", - | "value" : [ { - | "type" : "ByteVector", - | "value" : "5PjDJaGfSPJj4tFzMRCiuuAasKg5n8dJKXKenhuwZexx" - | }, { - | "type" : "Int", - | "value" : 1 - | }, { - | "type" : "Boolean", - | "value" : true - | } ] - | }, { - | "name" : "Reissue.@complexity", - | "type" : "Int", - | "value" : 1 - | }, { - | "name" : "@complexityLimit", - | "type" : "Int", - | "value" : 51999 - | }, { - | "name" : "cons.@args", - | "type" : "Array", - | "value" : [ { - | "type" : "Reissue", - | "value" : { - | "assetId" : { - | "type" : "ByteVector", - | "value" : "5PjDJaGfSPJj4tFzMRCiuuAasKg5n8dJKXKenhuwZexx" - | }, - | "quantity" : { - | "type" : "Int", - | "value" : 1 - | }, - | "isReissuable" : { - | "type" : "Boolean", - | "value" : true - | } - | } - | }, { - | "type" : "Array", - | "value" : [ ] - | } ] - | }, { - | "name" : "cons.@complexity", - | "type" : "Int", - | "value" : 1 - | }, { - | "name" : "@complexityLimit", - | "type" : "Int", - | "value" : 51998 - | } ] - |} ] - | - """.stripMargin - ) + error.fold { + (json \ "expression").as[String] shouldBe expression.bytes.value().base64 + (json \ "valid").as[Boolean] shouldBe true + (json \ "trace").as[JsArray] should matchJson( + s""" + |[ { + | "type" : "dApp", + | "id" : "3MtGzgmNa5fMjGCcPi5nqMTdtZkfojyWHL9", + | "function" : "default", + | "args" : [ ], + | "invocations" : [ ], + | "result" : { + | "data" : [ ], + | "transfers" : [ ], + | "issues" : [ ], + | "reissues" : [ { + | "assetId" : "5PjDJaGfSPJj4tFzMRCiuuAasKg5n8dJKXKenhuwZexx", + | "isReissuable" : true, + | "quantity" : 1 + | } ], + | "burns" : [ ], + | "sponsorFees" : [ ], + | "leases" : [ ], + | "leaseCancels" : [ ], + | "invokes" : [ ] + | }, + | "error" : null, + | "vars" : [ { + | "name" : "i", + | "type" : "Invocation", + | "value" : { + | "originCaller" : { + | "type" : "Address", + | "value" : { + | "bytes" : { + | "type" : "ByteVector", + | "value" : "3MtGzgmNa5fMjGCcPi5nqMTdtZkfojyWHL9" + | } + | } + | }, + | "payments" : { + | "type" : "Array", + | "value" : [ ] + | }, + | "callerPublicKey" : { + | "type" : "ByteVector", + | "value" : "9BUoYQYq7K38mkk61q8aMH9kD9fKSVL1Fib7FbH6nUkQ" + | }, + | "feeAssetId" : { + | "type" : "Unit", + | "value" : { } + | }, + | "originCallerPublicKey" : { + | "type" : "ByteVector", + | "value" : "9BUoYQYq7K38mkk61q8aMH9kD9fKSVL1Fib7FbH6nUkQ" + | }, + | "transactionId" : { + | "type" : "ByteVector", + | "value" : "${invokeExpression.id()}" + | }, + | "caller" : { + | "type" : "Address", + | "value" : { + | "bytes" : { + | "type" : "ByteVector", + | "value" : "3MtGzgmNa5fMjGCcPi5nqMTdtZkfojyWHL9" + | } + | } + | }, + | "fee" : { + | "type" : "Int", + | "value" : 1000000 + | } + | } + | }, { + | "name" : "default.@args", + | "type" : "Array", + | "value" : [ ] + | }, { + | "name" : "assetId", + | "type" : "ByteVector", + | "value" : "5PjDJaGfSPJj4tFzMRCiuuAasKg5n8dJKXKenhuwZexx" + | }, { + | "name" : "Reissue.@args", + | "type" : "Array", + | "value" : [ { + | "type" : "ByteVector", + | "value" : "5PjDJaGfSPJj4tFzMRCiuuAasKg5n8dJKXKenhuwZexx" + | }, { + | "type" : "Int", + | "value" : 1 + | }, { + | "type" : "Boolean", + | "value" : true + | } ] + | }, { + | "name" : "Reissue.@complexity", + | "type" : "Int", + | "value" : 1 + | }, { + | "name" : "@complexityLimit", + | "type" : "Int", + | "value" : 51999 + | }, { + | "name" : "cons.@args", + | "type" : "Array", + | "value" : [ { + | "type" : "Reissue", + | "value" : { + | "assetId" : { + | "type" : "ByteVector", + | "value" : "5PjDJaGfSPJj4tFzMRCiuuAasKg5n8dJKXKenhuwZexx" + | }, + | "quantity" : { + | "type" : "Int", + | "value" : 1 + | }, + | "isReissuable" : { + | "type" : "Boolean", + | "value" : true + | } + | } + | }, { + | "type" : "Array", + | "value" : [ ] + | } ] + | }, { + | "name" : "cons.@complexity", + | "type" : "Int", + | "value" : 1 + | }, { + | "name" : "@complexityLimit", + | "type" : "Int", + | "value" : 51998 + | } ] + |} ] + | + """.stripMargin + ) + }(message => (json \ "error").as[String] should include(message)) } } - assert(ContinuationTransaction) - intercept[Exception](assert(RideV6)).getMessage should include( - s"${BlockchainFeatures.ContinuationTransaction.description} feature has not been activated yet" - ) + assert(ContinuationTransaction, None) + assert(RideV6, Some("Continuation Transaction feature has not been activated yet")) } }