Skip to content

Commit 35495d1

Browse files
author
Michal Mrozek
committed
[CHORE] Refactor dependencies, update scalacheck
1 parent 63283cc commit 35495d1

File tree

64 files changed

+2449
-1569
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+2449
-1569
lines changed

.scalafmt.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
version = "2.3.0"
1+
version = "2.7.1"
22
align = none
33
maxColumn = 120

build.sbt

Lines changed: 25 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -11,58 +11,33 @@ val commonSettings = Seq(
1111
// Resolver for rocksDb
1212
resolvers += "rocksDb" at "https://dl.bintray.com/ethereum/maven/"
1313

14-
val dep = {
15-
val akkaVersion = "2.6.9"
16-
val akkaHttpVersion = "10.2.0"
17-
val circeVersion = "0.9.3"
18-
val rocksDb = "5.9.2"
14+
val malletDeps = Seq(
15+
Dependencies.scopt
16+
).flatten ++ Seq(
17+
"org.jline" % "jline" % "3.1.2",
18+
"net.java.dev.jna" % "jna" % "4.5.1"
19+
)
1920

21+
val dep = {
2022
Seq(
21-
"com.typesafe.akka" %% "akka-actor" % akkaVersion,
22-
"com.typesafe.akka" %% "akka-slf4j" % akkaVersion,
23-
"com.typesafe.akka" %% "akka-testkit" % akkaVersion,
24-
"com.typesafe.akka" %% "akka-stream" % akkaVersion,
25-
"com.typesafe.akka" %% "akka-http" % akkaHttpVersion,
26-
"ch.megard" %% "akka-http-cors" % "1.1.0",
27-
"org.json4s" %% "json4s-native" % "3.5.4",
28-
"de.heikoseeberger" %% "akka-http-json4s" % "1.34.0",
29-
"com.typesafe.akka" %% "akka-http-testkit" % akkaHttpVersion % "it,test",
30-
"io.suzaku" %% "boopickle" % "1.3.0",
31-
"org.ethereum" % "rocksdbjni" % rocksDb,
32-
"org.scalatest" %% "scalatest" % "3.0.5" % "it,test",
33-
"org.scalamock" %% "scalamock-scalatest-support" % "3.6.0" % "test",
34-
"org.scalacheck" %% "scalacheck" % "1.14.0" % "it,test",
35-
"ch.qos.logback" % "logback-classic" % "1.2.3",
36-
"org.jline" % "jline" % "3.1.2",
37-
"org.scala-lang.modules" %% "scala-parser-combinators" % "1.1.0",
38-
"io.circe" %% "circe-core" % circeVersion,
39-
"io.circe" %% "circe-generic" % circeVersion,
40-
"io.circe" %% "circe-parser" % circeVersion,
41-
"io.circe" %% "circe-generic-extras" % circeVersion,
42-
"com.miguno.akka" %% "akka-mock-scheduler" % "0.5.5" % "it,test",
43-
"commons-io" % "commons-io" % "2.6",
44-
"org.scala-sbt.ipcsocket" % "ipcsocket" % "1.0.0",
45-
"org.bouncycastle" % "bcprov-jdk15on" % "1.59",
46-
"com.typesafe.scala-logging" %% "scala-logging" % "3.9.0",
47-
"org.typelevel" %% "mouse" % "0.23",
48-
"org.typelevel" %% "cats-core" % "2.0.0",
49-
"org.typelevel" %% "cats-effect" % "2.0.0",
50-
"com.twitter" %% "util-collection" % "18.5.0",
51-
"com.google.guava" % "guava" % "28.0-jre",
52-
"io.monix" %% "monix" % "3.1.0",
53-
"com.beachape" %% "enumeratum" % "1.5.13",
54-
"com.beachape" %% "enumeratum-cats" % "1.5.15",
55-
"com.beachape" %% "enumeratum-scalacheck" % "1.5.16" % Test,
56-
// mallet deps
57-
"org.jline" % "jline" % "3.1.2",
58-
"net.java.dev.jna" % "jna" % "4.5.1",
59-
"org.scala-lang.modules" %% "scala-parser-combinators" % "1.0.5",
60-
"com.github.scopt" %% "scopt" % "3.7.0",
61-
// Metrics (https://github.com/DataDog/java-dogstatsd-client)
62-
"com.datadoghq" % "java-dogstatsd-client" % "2.5",
63-
"org.xerial.snappy" % "snappy-java" % "1.1.7.2",
64-
"org.web3j" % "core" % "3.4.0" % "test"
65-
)
23+
Dependencies.akka,
24+
Dependencies.akkaHttp,
25+
Dependencies.json4s,
26+
Dependencies.circe,
27+
Dependencies.boopickle,
28+
Dependencies.rocksDb,
29+
Dependencies.enumeratum,
30+
Dependencies.testing,
31+
Dependencies.cats,
32+
Dependencies.monix,
33+
Dependencies.twitterUtilCollection,
34+
Dependencies.crypto,
35+
Dependencies.scopt,
36+
Dependencies.logging,
37+
Dependencies.apacheCommons,
38+
Dependencies.metrics,
39+
Dependencies.dependencies
40+
).flatten ++ malletDeps
6641
}
6742

6843
val Integration = config("it") extend Test
@@ -144,7 +119,6 @@ jdkPackagerJVMArgs := Seq(
144119

145120
coverageExcludedPackages := "io\\.iohk\\.ethereum\\.extvm\\.msg.*"
146121

147-
148122
addCommandAlias(
149123
"compile-all",
150124
""";compile

project/Dependencies.scala

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
import sbt._
2+
3+
object Dependencies {
4+
5+
val akka: Seq[ModuleID] = {
6+
val akkaVersion = "2.6.9"
7+
8+
Seq(
9+
"com.typesafe.akka" %% "akka-actor" % akkaVersion,
10+
"com.typesafe.akka" %% "akka-slf4j" % akkaVersion,
11+
"com.typesafe.akka" %% "akka-testkit" % akkaVersion,
12+
"com.typesafe.akka" %% "akka-stream" % akkaVersion,
13+
"com.miguno.akka" %% "akka-mock-scheduler" % "0.5.5" % "it,test"
14+
)
15+
}
16+
17+
val akkaHttp: Seq[ModuleID] = {
18+
val akkaHttpVersion = "10.2.0"
19+
20+
Seq(
21+
"com.typesafe.akka" %% "akka-http" % akkaHttpVersion,
22+
"ch.megard" %% "akka-http-cors" % "1.1.0",
23+
"de.heikoseeberger" %% "akka-http-json4s" % "1.34.0",
24+
"com.typesafe.akka" %% "akka-http-testkit" % akkaHttpVersion % "it,test"
25+
)
26+
}
27+
28+
val json4s = Seq("org.json4s" %% "json4s-native" % "3.5.4")
29+
30+
val circe: Seq[ModuleID] = {
31+
val circeVersion = "0.12.1" //0.9.3
32+
33+
Seq(
34+
"io.circe" %% "circe-core" % circeVersion,
35+
"io.circe" %% "circe-generic" % circeVersion,
36+
"io.circe" %% "circe-parser" % circeVersion,
37+
"io.circe" %% "circe-generic-extras" % circeVersion
38+
)
39+
}
40+
41+
val boopickle = Seq("io.suzaku" %% "boopickle" % "1.3.0")
42+
43+
val rocksDb = Seq(
44+
"org.ethereum" % "rocksdbjni" % "5.9.2"
45+
)
46+
47+
val enumeratum: Seq[ModuleID] = Seq(
48+
"com.beachape" %% "enumeratum" % "1.5.13",
49+
"com.beachape" %% "enumeratum-cats" % "1.5.15",
50+
"com.beachape" %% "enumeratum-scalacheck" % "1.5.16" % Test
51+
)
52+
53+
val testing: Seq[ModuleID] = Seq(
54+
"org.scalatest" %% "scalatest" % "3.0.8" % "it,test",
55+
"org.scalamock" %% "scalamock-scalatest-support" % "3.6.0" % "test",
56+
"org.scalacheck" %% "scalacheck" % "1.14.1" % "it,test"
57+
)
58+
59+
val cats: Seq[ModuleID] = {
60+
val catsVersion = "2.0.0"
61+
Seq(
62+
"org.typelevel" %% "mouse" % "0.23",
63+
"org.typelevel" %% "cats-core" % catsVersion,
64+
"org.typelevel" %% "cats-effect" % catsVersion
65+
)
66+
}
67+
68+
val monix = Seq(
69+
"io.monix" %% "monix" % "3.1.0"
70+
)
71+
72+
val logging = Seq(
73+
"ch.qos.logback" % "logback-classic" % "1.2.3",
74+
"com.typesafe.scala-logging" %% "scala-logging" % "3.9.0"
75+
)
76+
77+
val twitterUtilCollection = Seq("com.twitter" %% "util-collection" % "18.5.0")
78+
79+
val crypto = Seq("org.bouncycastle" % "bcprov-jdk15on" % "1.59")
80+
81+
val scopt = Seq("com.github.scopt" % "scopt_2.12" % "3.7.0")
82+
83+
val metrics = Seq(
84+
// Metrics (https://github.com/DataDog/java-dogstatsd-client)
85+
"com.datadoghq" % "java-dogstatsd-client" % "2.5",
86+
"org.xerial.snappy" % "snappy-java" % "1.1.7.2",
87+
"org.web3j" % "core" % "3.4.0" % "test"
88+
)
89+
90+
val apacheCommons = Seq(
91+
"commons-io" % "commons-io" % "2.6"
92+
)
93+
94+
val dependencies = Seq(
95+
"org.jline" % "jline" % "3.1.2",
96+
"org.scala-lang.modules" %% "scala-parser-combinators" % "1.1.0",
97+
"org.scala-sbt.ipcsocket" % "ipcsocket" % "1.0.0",
98+
"com.google.guava" % "guava" % "28.0-jre"
99+
)
100+
101+
}

src/main/resources/application.conf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,8 @@ mantis {
229229
# Declaring the protocol here means that a more protocol-specific configuration
230230
# is pulled from the corresponding consensus implementation.
231231
# For example, in case of ethash, a section named `ethash` is used.
232+
# Available protocols: ethash, mocked
233+
# In case of mocked, remember to enable qa api
232234
protocol = ethash
233235

234236
# If true then the consensus protocol uses this node for mining.

0 commit comments

Comments
 (0)