From de9ea663c73f63c615a15a6d42744b189aaffdcc Mon Sep 17 00:00:00 2001 From: Sergey Nazarov Date: Wed, 18 Feb 2026 12:21:07 +0300 Subject: [PATCH 1/7] Bumped node version to 1.6.1 --- build.sbt | 4 ++-- src/test/scala/units/C2ETransfersTestSuite.scala | 2 +- src/test/scala/units/ExtensionDomain.scala | 3 ++- src/test/scala/units/TestSettings.scala | 3 ++- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/build.sbt b/build.sbt index d61d1c47..db34f0f3 100644 --- a/build.sbt +++ b/build.sbt @@ -3,7 +3,7 @@ import com.github.sbt.git.SbtGit.GitKeys.gitCurrentBranch enablePlugins(UniversalDeployPlugin, GitVersioning, sbtdocker.DockerPlugin, VersionObject) git.useGitDescribe := true -git.baseVersion := "1.3.0" +git.baseVersion := "1.4.0" git.uncommittedSignifier := Some("DIRTY") inScope(Global)( @@ -33,7 +33,7 @@ name := "consensus-client" maintainer := "Units Network Team" libraryDependencies ++= { - val node = "1.5.12" + val node = "1.6.1" val sttpVersion = "3.11.0" Seq( "com.wavesplatform" % "node-testkit" % node % Test, diff --git a/src/test/scala/units/C2ETransfersTestSuite.scala b/src/test/scala/units/C2ETransfersTestSuite.scala index 879729b0..578ae68a 100644 --- a/src/test/scala/units/C2ETransfersTestSuite.scala +++ b/src/test/scala/units/C2ETransfersTestSuite.scala @@ -28,7 +28,7 @@ class C2ETransfersTestSuite extends BaseTestSuite { "0x" -> "Invalid Ethereum address", "000000000000000000000000000000000000000003" -> "Invalid Ethereum address", "0x00000000000000000000000000000000000001" -> "Invalid Ethereum address", - "QQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQ" -> "Unrecognized character: q" + "QQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQ" -> "Unrecognized character: Q" ) ) { case (address, message) => transferFuncTest(address) should produce(message) diff --git a/src/test/scala/units/ExtensionDomain.scala b/src/test/scala/units/ExtensionDomain.scala index 1ace18e9..669ee23b 100644 --- a/src/test/scala/units/ExtensionDomain.scala +++ b/src/test/scala/units/ExtensionDomain.scala @@ -2,7 +2,7 @@ package units import cats.syntax.either.* import com.wavesplatform.account.{Address, KeyPair, PublicKey, SeedKeyPair} -import com.wavesplatform.api.common.{CommonAccountsApi, CommonAssetsApi, CommonBlocksApi, CommonTransactionsApi} +import com.wavesplatform.api.common.{CommonAccountsApi, CommonAssetsApi, CommonBlocksApi, CommonGeneratorsApi, CommonTransactionsApi} import com.wavesplatform.api.http.requests.InvokeScriptRequest.FunctionCallPart import com.wavesplatform.api.http.utils.UtilsEvaluator import com.wavesplatform.block.Block.BlockId @@ -119,6 +119,7 @@ class ExtensionDomain( override def blocksApi: CommonBlocksApi = self.blocksApi override def accountsApi: CommonAccountsApi = self.accountsApi override def assetsApi: CommonAssetsApi = self.assetsApi + override def generatorsApi: CommonGeneratorsApi = self.generatorsApi override def utxEvents: Observable[UtxEvent] = Observable.empty } diff --git a/src/test/scala/units/TestSettings.scala b/src/test/scala/units/TestSettings.scala index 42da68d5..e5c939f4 100644 --- a/src/test/scala/units/TestSettings.scala +++ b/src/test/scala/units/TestSettings.scala @@ -3,6 +3,7 @@ package units import com.typesafe.config.ConfigFactory import com.wavesplatform.account.{Address, KeyPair, PrivateKey, SeedKeyPair} import com.wavesplatform.db.WithState.AddrWithBalance +import com.wavesplatform.history.Domain import com.wavesplatform.settings.WavesSettings import com.wavesplatform.state.Height import com.wavesplatform.test.{DomainPresets, NumericExt} @@ -23,7 +24,7 @@ case class TestSettings( def finalAdditionalBalances: List[AddrWithBalance] = additionalBalances ++ initialMiners.collect { case x if !additionalBalances.exists(_.address == x.address) => AddrWithBalance(x.address, x.wavesBalance) } - def walletSeed: Array[Byte] = wavesSettings.walletSettings.seed.getOrElse(throw new RuntimeException("No wallet seed")).arr + def walletSeed: Array[Byte] = Domain.DefaultWalletSeed def withEnabledElMining: TestSettings = copy(wavesSettings = wavesSettings.copy(config = ConfigFactory.parseString("units.defaults.mining-enable = true").withFallback(wavesSettings.config)) From 3e755beb253017342168d5ee650e5fdd1d44bb7f Mon Sep 17 00:00:00 2001 From: Sergey Nazarov Date: Wed, 18 Feb 2026 20:21:02 +0300 Subject: [PATCH 2/7] fixed docker build --- build.sbt | 31 +++++++++++++++++++------------ project/plugins.sbt | 1 - 2 files changed, 19 insertions(+), 13 deletions(-) diff --git a/build.sbt b/build.sbt index db34f0f3..f4c1cdd0 100644 --- a/build.sbt +++ b/build.sbt @@ -1,6 +1,8 @@ import com.github.sbt.git.SbtGit.GitKeys.gitCurrentBranch -enablePlugins(UniversalDeployPlugin, GitVersioning, sbtdocker.DockerPlugin, VersionObject) +import scala.sys.process.{Process, ProcessLogger} + +enablePlugins(UniversalDeployPlugin, GitVersioning, VersionObject) git.useGitDescribe := true git.baseVersion := "1.4.0" @@ -95,18 +97,23 @@ buildTarballsForDocker := { ) } -inTask(docker)( - Seq( - imageNames := Seq( - ImageName(s"consensus-client:${gitCurrentBranch.value}"), // Integration tests - ImageName("consensus-client:local") // local-network - ), - dockerfile := NativeDockerfile(baseDirectory.value / "docker" / "Dockerfile"), - buildOptions := BuildOptions( - pullBaseImage = BuildOptions.Pull.IfMissing - ) +val docker = taskKey[Unit]("Build docker image for integration tests") +docker := { + val log = streams.value.log + + val cwd = baseDirectory.value / "docker" + + val cmd = Seq("docker", "build", "-t", "consensus-client:local", "-t", s"consensus-client:${gitCurrentBranch.value}",".") + log.info(s"Running `${cmd.mkString(" ")}` from $cwd") + + val processLogger = ProcessLogger( + (out: String) => log.info(out), + (err: String) => log.info(err) // Redirect STDERR to info ) -) + + val exit = Process(cmd, cwd).!(processLogger) + if (exit != 0) sys.error(s"Docker build failed with exit code $exit") +} docker := docker.dependsOn(LocalRootProject / buildTarballsForDocker).value diff --git a/project/plugins.sbt b/project/plugins.sbt index cca14156..0469efdd 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -12,6 +12,5 @@ libraryDependencies ++= Seq( Seq( "com.github.sbt" % "sbt-native-packager" % "1.10.0", "com.github.sbt" % "sbt-ci-release" % "1.5.12", - "se.marcuslonnberg" % "sbt-docker" % "1.10.0", "org.scalameta" % "sbt-scalafmt" % "2.5.4" ).map(addSbtPlugin) From b00a661759832aa95add5a85b80d715058bea54f Mon Sep 17 00:00:00 2001 From: Sergey Nazarov Date: Thu, 19 Feb 2026 10:10:23 +0300 Subject: [PATCH 3/7] bumped testcontainers --- build.sbt | 6 +++++- consensus-client-it/build.sbt | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/build.sbt b/build.sbt index f4c1cdd0..9b723988 100644 --- a/build.sbt +++ b/build.sbt @@ -34,6 +34,10 @@ inScope(Global)( name := "consensus-client" maintainer := "Units Network Team" +//dependencyOverrides ++= Seq( +// "org.slf4j" % "slf4j-api" % "1.7.30" +//) + libraryDependencies ++= { val node = "1.6.1" val sttpVersion = "3.11.0" @@ -43,7 +47,7 @@ libraryDependencies ++= { "com.softwaremill.sttp.client3" %% "core" % sttpVersion, "com.softwaremill.sttp.client3" %% "play-json" % sttpVersion, "com.github.jwt-scala" %% "jwt-play-json" % "11.0.3", - "org.web3j" % "core" % "4.9.8" + ("org.web3j" % "core" % "4.9.8").exclude("org.slf4j", "slf4j-api") ) } diff --git a/consensus-client-it/build.sbt b/consensus-client-it/build.sbt index edeecbcb..080450fc 100644 --- a/consensus-client-it/build.sbt +++ b/consensus-client-it/build.sbt @@ -15,7 +15,7 @@ import scala.util.control.NonFatal description := "Consensus client integration tests" libraryDependencies ++= Seq( - "org.testcontainers" % "testcontainers" % "2.0.1", + "org.testcontainers" % "testcontainers" % "2.0.3", "org.web3j" % "core" % "4.9.8" ).map(_ % Test) From 326dca6934bf934b9c0942db5e2333684c00c2ab Mon Sep 17 00:00:00 2001 From: Sergey Nazarov Date: Thu, 19 Feb 2026 11:35:59 +0300 Subject: [PATCH 4/7] fixed dependencies --- build.sbt | 24 ++++++++++++++++++------ project/build.properties | 2 +- 2 files changed, 19 insertions(+), 7 deletions(-) diff --git a/build.sbt b/build.sbt index 9b723988..b4b57e24 100644 --- a/build.sbt +++ b/build.sbt @@ -34,9 +34,18 @@ inScope(Global)( name := "consensus-client" maintainer := "Units Network Team" -//dependencyOverrides ++= Seq( -// "org.slf4j" % "slf4j-api" % "1.7.30" -//) +// These overrides are needed so that there are no different versions of the same component on the classpath when the extension is installed +dependencyOverrides ++= Seq( + "org.playframework" %% "play-json" % "3.0.6", + "com.squareup.okhttp3" % "okhttp" % "4.12.0", + "com.squareup.okhttp3" % "logging-interceptor" % "4.12.0", + "com.squareup.okio" % "okio" % "3.6.0", + "com.squareup.okio" % "okio-jvm" % "3.16.4", + "org.reactivestreams" % "reactive-streams" % "1.0.4", + "org.jetbrains.kotlin" % "kotlin-stdlib" % "2.2.20", + "org.jetbrains.kotlin" % "kotlin-stdlib-jdk7" % "1.8.21", + "org.jetbrains.kotlin" % "kotlin-stdlib-jdk8" % "1.8.21" +) libraryDependencies ++= { val node = "1.6.1" @@ -47,7 +56,10 @@ libraryDependencies ++= { "com.softwaremill.sttp.client3" %% "core" % sttpVersion, "com.softwaremill.sttp.client3" %% "play-json" % sttpVersion, "com.github.jwt-scala" %% "jwt-play-json" % "11.0.3", - ("org.web3j" % "core" % "4.9.8").exclude("org.slf4j", "slf4j-api") + ("org.web3j" % "core" % "4.9.8").excludeAll( + ExclusionRule("org.slf4j", "slf4j-api"), + ExclusionRule("org.bouncycastle", "bcprov-jdk15on") + ) ) } @@ -105,9 +117,9 @@ val docker = taskKey[Unit]("Build docker image for integration tests") docker := { val log = streams.value.log - val cwd = baseDirectory.value / "docker" + val cwd = baseDirectory.value / "docker" - val cmd = Seq("docker", "build", "-t", "consensus-client:local", "-t", s"consensus-client:${gitCurrentBranch.value}",".") + val cmd = Seq("docker", "build", "-t", "consensus-client:local", "-t", s"consensus-client:${gitCurrentBranch.value}", ".") log.info(s"Running `${cmd.mkString(" ")}` from $cwd") val processLogger = ProcessLogger( diff --git a/project/build.properties b/project/build.properties index bbb0b608..c605beba 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version=1.11.2 +sbt.version=1.12.3 From 9a3edd0ee30acaf7d5a2e48198123a344c6514b2 Mon Sep 17 00:00:00 2001 From: Sergey Nazarov Date: Thu, 19 Feb 2026 12:33:18 +0300 Subject: [PATCH 5/7] increased timeout --- .github/workflows/check-pr.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/check-pr.yml b/.github/workflows/check-pr.yml index 4471d07c..51af4ba4 100644 --- a/.github/workflows/check-pr.yml +++ b/.github/workflows/check-pr.yml @@ -47,7 +47,7 @@ jobs: local-network: name: Run Local Network tests - timeout-minutes: 10 + timeout-minutes: 15 runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 From dd7f20fa614dc80285800fe18a85c70c90842273 Mon Sep 17 00:00:00 2001 From: Vyatcheslav Suharnikov Date: Thu, 19 Feb 2026 16:51:05 +0400 Subject: [PATCH 6/7] Fix restart.sh hanging on docker compose logs -f --- local-network/restart.sh | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/local-network/restart.sh b/local-network/restart.sh index 2523beb1..e23f0a37 100755 --- a/local-network/restart.sh +++ b/local-network/restart.sh @@ -16,4 +16,23 @@ export COMPOSE_PROFILES="${COMPOSE_PROFILES:-}" echo "Compose profiles are: ${COMPOSE_PROFILES}" docker compose up -d -docker compose logs deploy tests -f + +# HACK: This command hangs forever in a new Docker version: docker compose logs deploy tests -f +mapfile -t ids < <(docker compose ps -aq deploy tests) + +if ((${#ids[@]} > 0)); then + pids=() + + # Follow logs in background + for id in "${ids[@]}"; do + docker logs -f "$id" & + pids+=("$!") + done + + # Wait for containers to exit + docker wait "${ids[@]}" >/dev/null + + # Stop log followers + kill "${pids[@]}" 2>/dev/null || true + wait "${pids[@]}" 2>/dev/null || true +fi From ce66b3bf062b1cad18b5913d81d035729326ea85 Mon Sep 17 00:00:00 2001 From: Sergey Nazarov Date: Fri, 20 Feb 2026 12:04:54 +0300 Subject: [PATCH 7/7] fixed deploy and tests --- local-network/README.md | 6 +++--- local-network/delete.sh | 2 +- local-network/docker-compose.yml | 8 ++++++++ local-network/restart.sh | 25 +++---------------------- local-network/stop.sh | 2 +- 5 files changed, 16 insertions(+), 27 deletions(-) diff --git a/local-network/README.md b/local-network/README.md index 9d7fd0df..a8a83d33 100644 --- a/local-network/README.md +++ b/local-network/README.md @@ -20,12 +20,12 @@ You have to build consensus client. Run [./consensus_client-image-build.sh](./co - Run `./all-images-build.sh` after pulling the repository, so docker compose will pull new external images and rebuild the `deploy` image. -- Available docker compose contexts: +- Available docker compose profiles: - BlockScout services: `bs` - Tests in the end `tests` - Run [./restart.sh](./restart.sh) - - With selected contexts, for example, `COMPOSE_PROFILES=bs,tests ./restart.sh` - - Or without any context: `./restart.sh` + - With selected profiles, for example, `COMPOSE_PROFILES=bs,tests ./restart.sh` + - Or without any profile: `./restart.sh` To retry failed: diff --git a/local-network/delete.sh b/local-network/delete.sh index 745525b2..b15752e6 100755 --- a/local-network/delete.sh +++ b/local-network/delete.sh @@ -5,7 +5,7 @@ shopt -s nullglob DIR="$(cd "$(dirname "$0")" && pwd)" cd "${DIR}" || exit -COMPOSE_PROFILES=bs,tests BS=enabled docker compose down +COMPOSE_PROFILES='*' BS=enabled docker compose down rm -rf data || true rm -rf logs || true diff --git a/local-network/docker-compose.yml b/local-network/docker-compose.yml index 124f5edd..cce96a30 100644 --- a/local-network/docker-compose.yml +++ b/local-network/docker-compose.yml @@ -3,6 +3,7 @@ include: - ./configs/blockscout/blockscout.yml services: ec-1: + profiles: [ nodes ] container_name: ec-1 extends: file: ../docker/services/op-geth.yml @@ -23,6 +24,7 @@ services: # ec-2: # container_name: ec-2 + # profiles: [ nodes ] # extends: # file: ../docker/services/op-geth.yml # service: op-geth @@ -43,6 +45,7 @@ services: # Make sure, you have enough RAM to run additional nodes # ec-3: # container_name: ec-3 + # profiles: [ nodes ] # extends: # file: ../docker/services/op-geth.yml # service: op-geth @@ -62,6 +65,7 @@ services: # ec-4: # container_name: ec-4 + # profiles: [ nodes ] # extends: # file: ../docker/services/op-geth.yml # service: op-geth @@ -81,6 +85,7 @@ services: waves-node-1: container_name: waves-node-1 + profiles: [ nodes ] image: ${WAVES_NODE_IMAGE_1:-${WAVES_NODE_IMAGE:-consensus-client:local}} ports: - "127.0.0.1:16869:6869" @@ -101,6 +106,7 @@ services: # Uncomment corresponding cl_miner in local/network.py if you want this node to mine # waves-node-2: + # profiles: [ nodes ] # container_name: waves-node-2 # image: ${WAVES_NODE_IMAGE_2:-${WAVES_NODE_IMAGE:-consensus-client:local}} # ports: @@ -120,6 +126,7 @@ services: # pull_policy: never # builds locally # waves-node-3: + # profiles: [ nodes ] # container_name: waves-node-3 # image: ${WAVES_NODE_IMAGE_3:-${WAVES_NODE_IMAGE:-consensus-client:local}} # ports: @@ -140,6 +147,7 @@ services: # pull_policy: never # builds locally # waves-node-4: + # profiles: [ nodes ] # container_name: waves-node-4 # image: ${WAVES_NODE_IMAGE_4:-${WAVES_NODE_IMAGE:-consensus-client:local}} # ports: diff --git a/local-network/restart.sh b/local-network/restart.sh index e23f0a37..5a03c8fa 100755 --- a/local-network/restart.sh +++ b/local-network/restart.sh @@ -12,27 +12,8 @@ else ./delete.sh fi -export COMPOSE_PROFILES="${COMPOSE_PROFILES:-}" +COMPOSE_PROFILES="${COMPOSE_PROFILES:-}" echo "Compose profiles are: ${COMPOSE_PROFILES}" -docker compose up -d - -# HACK: This command hangs forever in a new Docker version: docker compose logs deploy tests -f -mapfile -t ids < <(docker compose ps -aq deploy tests) - -if ((${#ids[@]} > 0)); then - pids=() - - # Follow logs in background - for id in "${ids[@]}"; do - docker logs -f "$id" & - pids+=("$!") - done - - # Wait for containers to exit - docker wait "${ids[@]}" >/dev/null - - # Stop log followers - kill "${pids[@]}" 2>/dev/null || true - wait "${pids[@]}" 2>/dev/null || true -fi +docker compose --profile nodes `[[ "${COMPOSE_PROFILES}" == *bs* ]] && echo --profile bs` up -d +docker compose --profile nodes up deploy `[[ "${COMPOSE_PROFILES}" == *tests* ]] && echo tests` diff --git a/local-network/stop.sh b/local-network/stop.sh index 6b48badf..ab8749a6 100755 --- a/local-network/stop.sh +++ b/local-network/stop.sh @@ -3,4 +3,4 @@ DIR="$(cd "$(dirname "$0")" && pwd)" cd "${DIR}" || exit -COMPOSE_PROFILES=bs,tests docker compose stop +COMPOSE_PROFILES='*' docker compose stop