Skip to content

Commit 397d0bd

Browse files
committed
[ETCM-283] Merge resolve + Refactor Fetcher code
Merge branch 'develop' of github.com:input-output-hk/mantis into etcm-283-validate-bodies-in-block-fetcher Conflicts: src/main/scala/io/iohk/ethereum/blockchain/sync/regular/BlockFetcher.scala src/main/scala/io/iohk/ethereum/blockchain/sync/regular/BlockFetcherState.scala src/test/scala/io/iohk/ethereum/blockchain/sync/regular/BlockFetcherSpec.scala src/test/scala/io/iohk/ethereum/blockchain/sync/regular/BlockFetcherStateSpec.scala
2 parents 149a549 + 057f84c commit 397d0bd

File tree

252 files changed

+7945
-4010
lines changed

Some content is hidden

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

252 files changed

+7945
-4010
lines changed

.buildkite/pipeline.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,5 @@ steps:
55
nix eval --json '(import ./.buildkite { pipeline = ./.buildkite/pipeline.nix; })' \
66
| buildkite-agent pipeline upload --no-interpolation
77
agents:
8-
queue: project42
8+
queue: project42
9+
timeout_in_minutes: 60

build.sbt

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ val commonSettings = Seq(
1212
name := "mantis",
1313
version := "3.0",
1414
scalaVersion := "2.12.12",
15+
// Scalanet snapshots are published to Sonatype after each build.
16+
resolvers += "Sonatype OSS Snapshots" at "https://oss.sonatype.org/content/repositories/snapshots",
1517
testOptions in Test += Tests
1618
.Argument(TestFrameworks.ScalaTest, "-l", "EthashMinerSpec") // miner tests disabled by default
1719
)
@@ -35,6 +37,7 @@ val dep = {
3537
Dependencies.testing,
3638
Dependencies.cats,
3739
Dependencies.monix,
40+
Dependencies.network,
3841
Dependencies.twitterUtilCollection,
3942
Dependencies.crypto,
4043
Dependencies.scopt,
@@ -63,6 +66,11 @@ val root = {
6366
val root = project
6467
.in(file("."))
6568
.configs(Integration, Benchmark, Evm, Ets, Snappy, Rpc)
69+
.enablePlugins(BuildInfoPlugin)
70+
.settings(
71+
buildInfoKeys := Seq[BuildInfoKey](name, version, git.gitHeadCommit),
72+
buildInfoPackage := "io.iohk.ethereum.utils"
73+
)
6674
.settings(commonSettings: _*)
6775
.settings(
6876
libraryDependencies ++= dep
@@ -113,8 +121,9 @@ Test / parallelExecution := true
113121
testOptions in Test += Tests.Argument("-oDG")
114122

115123
// protobuf compilation
124+
// Into a subdirectory of src_managed to avoid it deleting other generated files; see https://github.com/sbt/sbt-buildinfo/issues/149
116125
PB.targets in Compile := Seq(
117-
scalapb.gen() -> (sourceManaged in Compile).value
126+
scalapb.gen() -> (sourceManaged in Compile).value / "protobuf"
118127
)
119128

120129
// have the protobuf API version file as a resource

insomnia_workspace.json

Lines changed: 95 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"_type": "export",
33
"__export_format": 4,
4-
"__export_date": "2020-10-02T11:18:34.806Z",
5-
"__export_source": "insomnia.desktop.app:v2020.4.1",
4+
"__export_date": "2020-11-02T20:39:43.839Z",
5+
"__export_source": "insomnia.desktop.app:v2020.4.2",
66
"resources": [
77
{
88
"_id": "req_4222a4d54ba24fa7813429bdcdb732df",
@@ -90,6 +90,88 @@
9090
"settingFollowRedirects": "global",
9191
"_type": "request"
9292
},
93+
{
94+
"_id": "req_5c84aeff984d41e4aca173ac56a0b113",
95+
"parentId": "fld_9f9137459d5c429d83901f5c682be0f9",
96+
"modified": 1604346888565,
97+
"created": 1603997152827,
98+
"url": "{{ faucet_url }}",
99+
"name": "send_funds",
100+
"description": "",
101+
"method": "POST",
102+
"body":
103+
{
104+
"mimeType": "application/json",
105+
"text": "{\n\t\"jsonrpc\": \"2.0\",\n \"method\": \"faucet_sendFunds\", \n \"params\": [\"$address\"],\n \"id\": 1\n}"
106+
},
107+
"parameters": [],
108+
"headers":
109+
[
110+
{
111+
"name": "Content-Type",
112+
"value": "application/json",
113+
"description": "",
114+
"id": "pair_b080d7c5b5194ad09efdd6926ed108c5",
115+
"disabled": false
116+
}
117+
],
118+
"authentication": {},
119+
"metaSortKey": -1603997152827,
120+
"isPrivate": false,
121+
"settingStoreCookies": true,
122+
"settingSendCookies": true,
123+
"settingDisableRenderRequestBody": false,
124+
"settingEncodeUrl": true,
125+
"settingRebuildPath": true,
126+
"settingFollowRedirects": "global",
127+
"_type": "request"
128+
},
129+
{
130+
"_id": "fld_9f9137459d5c429d83901f5c682be0f9",
131+
"parentId": "wrk_097d43914a4d4aea8b6f73f647921182",
132+
"modified": 1604349428103,
133+
"created": 1603918083216,
134+
"name": "faucet",
135+
"description": "",
136+
"environment": {},
137+
"environmentPropertyOrder": null,
138+
"metaSortKey": -1552939140242,
139+
"_type": "request_group"
140+
},
141+
{
142+
"_id": "req_48316ba9ba834bcc94fdeae41d966eb9",
143+
"parentId": "fld_9f9137459d5c429d83901f5c682be0f9",
144+
"modified": 1604346774105,
145+
"created": 1604338553808,
146+
"url": "{{ faucet_url }}",
147+
"name": "status",
148+
"description": "",
149+
"method": "POST",
150+
"body":
151+
{
152+
"mimeType": "application/json",
153+
"text": "{\n\t\"jsonrpc\": \"2.0\",\n \"method\": \"faucet_status\", \n \"params\": [],\n \"id\": 1\n}"
154+
},
155+
"parameters": [],
156+
"headers":
157+
[
158+
{
159+
"name": "Content-Type",
160+
"value": "application/json",
161+
"id": "pair_bce95e5eaba54223bb10210f4563af71"
162+
}
163+
],
164+
"authentication": {},
165+
"metaSortKey": -1604338553809,
166+
"isPrivate": false,
167+
"settingStoreCookies": true,
168+
"settingSendCookies": true,
169+
"settingDisableRenderRequestBody": false,
170+
"settingEncodeUrl": true,
171+
"settingRebuildPath": true,
172+
"settingFollowRedirects": "global",
173+
"_type": "request"
174+
},
93175
{
94176
"_id": "req_cd0078ce4a034ebdbdf7dc9e20e78a29",
95177
"parentId": "fld_2b54cbb84e244284b3ef752c5f805376",
@@ -1203,15 +1285,20 @@
12031285
{
12041286
"_id": "env_2e1a8d7b5f3649308cb3c524e84a3f33",
12051287
"parentId": "env_ee4c8118750744559d3b1020845fe5d4",
1206-
"modified": 1599825641645,
1288+
"modified": 1604347516298,
12071289
"created": 1552663140073,
12081290
"name": "Develop",
1209-
"data": {
1210-
"node_url": "http://127.0.0.1:8546"
1291+
"data":
1292+
{
1293+
"node_url": "http://127.0.0.1:8546",
1294+
"faucet_url": "http://127.0.0.1:8099"
12111295
},
1212-
"dataPropertyOrder": {
1213-
"&": [
1214-
"node_url"
1296+
"dataPropertyOrder":
1297+
{
1298+
"&":
1299+
[
1300+
"node_url",
1301+
"faucet_url"
12151302
]
12161303
},
12171304
"color": null,

project/Dependencies.scala

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,14 @@ object Dependencies {
7070
"io.monix" %% "monix" % "3.2.2"
7171
)
7272

73+
val network: Seq[ModuleID] = {
74+
val scalanetVersion = "0.4.2-SNAPSHOT"
75+
Seq(
76+
"io.iohk" %% "scalanet" % scalanetVersion,
77+
"io.iohk" %% "scalanet-discovery" % scalanetVersion
78+
)
79+
}
80+
7381
val logging = Seq(
7482
"ch.qos.logback" % "logback-classic" % "1.2.3",
7583
"com.typesafe.scala-logging" %% "scala-logging" % "3.9.2",

project/plugins.sbt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,7 @@ addSbtPlugin("com.typesafe.sbt" % "sbt-native-packager" % "1.7.5")
66
addSbtPlugin("com.thoughtworks.sbt-api-mappings" % "sbt-api-mappings" % "3.0.0")
77
addSbtPlugin("com.thesamet" % "sbt-protoc" % "0.99.25")
88
addSbtPlugin("com.timushev.sbt" % "sbt-updates" % "0.5.1")
9+
addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.9.0")
10+
addSbtPlugin("com.typesafe.sbt" % "sbt-git" % "1.0.0")
911

1012
libraryDependencies += "com.trueaccord.scalapb" %% "compilerplugin" % "0.6.6"

0 commit comments

Comments
 (0)