Skip to content

Commit 0f73e7e

Browse files
authored
Merge pull request #770 from input-output-hk/ETCM-168-discovery-part4
ETCM-168: Discovery part4
2 parents ac691fd + 02f3469 commit 0f73e7e

28 files changed

+807
-800
lines changed

project/Dependencies.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ object Dependencies {
7171
)
7272

7373
val network: Seq[ModuleID] = {
74-
val scalanetVersion = "0.4-SNAPSHOT"
74+
val scalanetVersion = "0.4.2-SNAPSHOT"
7575
Seq(
7676
"io.iohk" %% "scalanet" % scalanetVersion,
7777
"io.iohk" %% "scalanet-discovery" % scalanetVersion

repo.nix

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -9,37 +9,37 @@
99
"nix-public" = "";
1010
};
1111
"artifacts" = {
12-
"nix-Sonatype OSS Snapshots/io/iohk/scalanet-discovery_2.12/0.4-SNAPSHOT/scalanet-discovery_2.12-0.4-SNAPSHOT-javadoc.jar" = {
13-
url = "https://oss.sonatype.org/content/repositories/snapshots/io/iohk/scalanet-discovery_2.12/0.4-SNAPSHOT/scalanet-discovery_2.12-0.4-SNAPSHOT-javadoc.jar";
14-
sha256 = "E1BFC529ACE03B29B2D7AB72F8587C55EDEEEE211EC795E328E2F738D67ECE57";
12+
"nix-Sonatype OSS Snapshots/io/iohk/scalanet-discovery_2.12/0.4.2-SNAPSHOT/scalanet-discovery_2.12-0.4.2-SNAPSHOT-javadoc.jar" = {
13+
url = "https://oss.sonatype.org/content/repositories/snapshots/io/iohk/scalanet-discovery_2.12/0.4.2-SNAPSHOT/scalanet-discovery_2.12-0.4.2-SNAPSHOT-javadoc.jar";
14+
sha256 = "190A1AB2C6EBEBDAE6E8729005018C6524C79E87447F09F0EC26DA7005D27AE2";
1515
};
16-
"nix-Sonatype OSS Snapshots/io/iohk/scalanet-discovery_2.12/0.4-SNAPSHOT/scalanet-discovery_2.12-0.4-SNAPSHOT-sources.jar" = {
17-
url = "https://oss.sonatype.org/content/repositories/snapshots/io/iohk/scalanet-discovery_2.12/0.4-SNAPSHOT/scalanet-discovery_2.12-0.4-SNAPSHOT-sources.jar";
18-
sha256 = "A86A69FB1E4973AFE1FC83FA6F49C6E71221083F437CB75333461024EBC39962";
16+
"nix-Sonatype OSS Snapshots/io/iohk/scalanet-discovery_2.12/0.4.2-SNAPSHOT/scalanet-discovery_2.12-0.4.2-SNAPSHOT-sources.jar" = {
17+
url = "https://oss.sonatype.org/content/repositories/snapshots/io/iohk/scalanet-discovery_2.12/0.4.2-SNAPSHOT/scalanet-discovery_2.12-0.4.2-SNAPSHOT-sources.jar";
18+
sha256 = "BE91870FA3F3F1B4D37344563B33CB06E6451788CACF2CB7BAA77C0108D8E2E5";
1919
};
20-
"nix-Sonatype OSS Snapshots/io/iohk/scalanet-discovery_2.12/0.4-SNAPSHOT/scalanet-discovery_2.12-0.4-SNAPSHOT.jar" = {
21-
url = "https://oss.sonatype.org/content/repositories/snapshots/io/iohk/scalanet-discovery_2.12/0.4-SNAPSHOT/scalanet-discovery_2.12-0.4-SNAPSHOT.jar";
22-
sha256 = "72DB578799E07B3D10612C8A61BFA3D21EAC31312E0BAFECCD203D0D637D7498";
20+
"nix-Sonatype OSS Snapshots/io/iohk/scalanet-discovery_2.12/0.4.2-SNAPSHOT/scalanet-discovery_2.12-0.4.2-SNAPSHOT.jar" = {
21+
url = "https://oss.sonatype.org/content/repositories/snapshots/io/iohk/scalanet-discovery_2.12/0.4.2-SNAPSHOT/scalanet-discovery_2.12-0.4.2-SNAPSHOT.jar";
22+
sha256 = "2FCBBF064CC95DA4328FB259F4424C1B745826A308249169EE4343C0C962CE94";
2323
};
24-
"nix-Sonatype OSS Snapshots/io/iohk/scalanet-discovery_2.12/0.4-SNAPSHOT/scalanet-discovery_2.12-0.4-SNAPSHOT.pom" = {
25-
url = "https://oss.sonatype.org/content/repositories/snapshots/io/iohk/scalanet-discovery_2.12/0.4-SNAPSHOT/scalanet-discovery_2.12-0.4-SNAPSHOT.pom";
26-
sha256 = "30830E277F9651F63FA521F111BFF95E00DD3B96FEF481E8B334F6539521B738";
24+
"nix-Sonatype OSS Snapshots/io/iohk/scalanet-discovery_2.12/0.4.2-SNAPSHOT/scalanet-discovery_2.12-0.4.2-SNAPSHOT.pom" = {
25+
url = "https://oss.sonatype.org/content/repositories/snapshots/io/iohk/scalanet-discovery_2.12/0.4.2-SNAPSHOT/scalanet-discovery_2.12-0.4.2-SNAPSHOT.pom";
26+
sha256 = "46B60B737421B7E5E4CEB6412DCAAD80221EDC3ACD7E2227CDA01F1A9F57E18E";
2727
};
28-
"nix-Sonatype OSS Snapshots/io/iohk/scalanet_2.12/0.4-SNAPSHOT/scalanet_2.12-0.4-SNAPSHOT-javadoc.jar" = {
29-
url = "https://oss.sonatype.org/content/repositories/snapshots/io/iohk/scalanet_2.12/0.4-SNAPSHOT/scalanet_2.12-0.4-SNAPSHOT-javadoc.jar";
30-
sha256 = "B38F674EEA0E4660D2A39245D9BC129FD9171312C5CCCCE9DB5D1BC140865A86";
28+
"nix-Sonatype OSS Snapshots/io/iohk/scalanet_2.12/0.4.2-SNAPSHOT/scalanet_2.12-0.4.2-SNAPSHOT-javadoc.jar" = {
29+
url = "https://oss.sonatype.org/content/repositories/snapshots/io/iohk/scalanet_2.12/0.4.2-SNAPSHOT/scalanet_2.12-0.4.2-SNAPSHOT-javadoc.jar";
30+
sha256 = "84D56180DC60D6F4F6911D4507622E91DE4E2C96582F97784135DBFDECB0B12B";
3131
};
32-
"nix-Sonatype OSS Snapshots/io/iohk/scalanet_2.12/0.4-SNAPSHOT/scalanet_2.12-0.4-SNAPSHOT-sources.jar" = {
33-
url = "https://oss.sonatype.org/content/repositories/snapshots/io/iohk/scalanet_2.12/0.4-SNAPSHOT/scalanet_2.12-0.4-SNAPSHOT-sources.jar";
34-
sha256 = "DBF79681BAC9A923B0EAB597BE5B849C6F444BB11662BB07DC755BBBD97590EB";
32+
"nix-Sonatype OSS Snapshots/io/iohk/scalanet_2.12/0.4.2-SNAPSHOT/scalanet_2.12-0.4.2-SNAPSHOT-sources.jar" = {
33+
url = "https://oss.sonatype.org/content/repositories/snapshots/io/iohk/scalanet_2.12/0.4.2-SNAPSHOT/scalanet_2.12-0.4.2-SNAPSHOT-sources.jar";
34+
sha256 = "07553109F5461D45AC1B048C134132E6CBB32EC838300093E550B8CFE62C434B";
3535
};
36-
"nix-Sonatype OSS Snapshots/io/iohk/scalanet_2.12/0.4-SNAPSHOT/scalanet_2.12-0.4-SNAPSHOT.jar" = {
37-
url = "https://oss.sonatype.org/content/repositories/snapshots/io/iohk/scalanet_2.12/0.4-SNAPSHOT/scalanet_2.12-0.4-SNAPSHOT.jar";
38-
sha256 = "98D7F789C0A80FE7F810B0BD75A0F623E787C0212CEBDB71B2501EA7588C999C";
36+
"nix-Sonatype OSS Snapshots/io/iohk/scalanet_2.12/0.4.2-SNAPSHOT/scalanet_2.12-0.4.2-SNAPSHOT.jar" = {
37+
url = "https://oss.sonatype.org/content/repositories/snapshots/io/iohk/scalanet_2.12/0.4.2-SNAPSHOT/scalanet_2.12-0.4.2-SNAPSHOT.jar";
38+
sha256 = "7DF884B172D973459BB7AF6553014B984FE87EC788DD35AEB27F0DEDDD4B215E";
3939
};
40-
"nix-Sonatype OSS Snapshots/io/iohk/scalanet_2.12/0.4-SNAPSHOT/scalanet_2.12-0.4-SNAPSHOT.pom" = {
41-
url = "https://oss.sonatype.org/content/repositories/snapshots/io/iohk/scalanet_2.12/0.4-SNAPSHOT/scalanet_2.12-0.4-SNAPSHOT.pom";
42-
sha256 = "5EB55ED46D169049D4EB371DB120C6F6EE37AFE89230DFA7CE11298714801481";
40+
"nix-Sonatype OSS Snapshots/io/iohk/scalanet_2.12/0.4.2-SNAPSHOT/scalanet_2.12-0.4.2-SNAPSHOT.pom" = {
41+
url = "https://oss.sonatype.org/content/repositories/snapshots/io/iohk/scalanet_2.12/0.4.2-SNAPSHOT/scalanet_2.12-0.4.2-SNAPSHOT.pom";
42+
sha256 = "A27D2641B97A06FDA1B2C81FA96FA1ECA1E563ACA36CEEF3C8C6070C0F1CF731";
4343
};
4444
"nix-public/ch/megard/akka-http-cors_2.12/1.1.0/akka-http-cors_2.12-1.1.0-javadoc.jar" = {
4545
url = "https://repo1.maven.org/maven2/ch/megard/akka-http-cors_2.12/1.1.0/akka-http-cors_2.12-1.1.0-javadoc.jar";

src/it/scala/io/iohk/ethereum/sync/util/CommonFakePeer.scala

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import io.iohk.ethereum.mpt.MerklePatriciaTrie
1919
import io.iohk.ethereum.network.EtcPeerManagerActor.PeerInfo
2020
import io.iohk.ethereum.network.PeerManagerActor.{FastSyncHostConfiguration, PeerConfiguration}
2121
import io.iohk.ethereum.network.discovery.{DiscoveryConfig, Node}
22-
import io.iohk.ethereum.network.discovery.PeerDiscoveryManager.{DiscoveredNodesInfo, DiscoveryNodeInfo}
22+
import io.iohk.ethereum.network.discovery.PeerDiscoveryManager.{DiscoveredNodesInfo}
2323
import io.iohk.ethereum.network.handshaker.{EtcHandshaker, EtcHandshakerConfiguration, Handshaker}
2424
import io.iohk.ethereum.network.p2p.EthereumMessageDecoder
2525
import io.iohk.ethereum.network.p2p.messages.CommonMessages.NewBlock
@@ -193,10 +193,7 @@ abstract class CommonFakePeer(peerName: String, fakePeerCustomConfig: FakePeerCu
193193
val listenAddress = randomAddress()
194194

195195
lazy val node =
196-
DiscoveryNodeInfo(
197-
Node(ByteString(nodeStatus.nodeId), listenAddress.getAddress, listenAddress.getPort, listenAddress.getPort),
198-
1
199-
)
196+
Node(ByteString(nodeStatus.nodeId), listenAddress.getAddress, listenAddress.getPort, listenAddress.getPort)
200197

201198
lazy val vmConfig = VmConfig(Config.config)
202199

@@ -259,14 +256,14 @@ abstract class CommonFakePeer(peerName: String, fakePeerCustomConfig: FakePeerCu
259256
} yield ()
260257
}
261258

262-
def connectToPeers(nodes: Set[DiscoveryNodeInfo]): Task[Unit] = {
259+
def connectToPeers(nodes: Set[Node]): Task[Unit] = {
263260
for {
264261
_ <- Task {
265262
peerManager ! DiscoveredNodesInfo(nodes)
266263
}
267264
_ <- retryUntilWithDelay(Task(storagesInstance.storages.knownNodesStorage.getKnownNodes()), 1.second, 5) {
268265
knownNodes =>
269-
val requestedNodes = nodes.map(_.node.id)
266+
val requestedNodes = nodes.map(_.id)
270267
val currentNodes = knownNodes.map(Node.fromUri).map(_.id)
271268
requestedNodes.subsetOf(currentNodes)
272269
}

src/main/resources/application.conf

Lines changed: 33 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -53,29 +53,51 @@ mantis {
5353
# Turn discovery of/off
5454
discovery-enabled = true
5555

56+
# Externally visible hostname or IP.
57+
host = null
58+
5659
# Listening interface for discovery protocol
5760
interface = "0.0.0.0"
5861

5962
# Listening port for discovery protocol
6063
port = 30303
6164

62-
# Maximum discovered nodes stored (TODO: remove me once full protocol is in place)
63-
nodes-limit = 5000
64-
65-
# Initial delay for discovery scan
66-
scan-initial-delay = 20.seconds
65+
# If true, the node considers the bootstrap and the previously persisted nodes
66+
# as already discovered and uses them as peer candidates to get blocks from.
67+
# Otherwise it enroll with the bootstrap nodes and gradually discover the
68+
# network every time we start, eventually serving candidates.
69+
#
70+
# Useful if discovery has problem, as the node can start syncing with the
71+
# bootstraps straight away.
72+
#
73+
# Note that setting reuse-known-nodes and discovery-enabled to false at the
74+
# same time would mean the node would have no peer candidates at all.
75+
reuse-known-nodes = true
6776

6877
# Scan interval for discovery
69-
scan-interval = 30.seconds
78+
scan-interval = 15.minutes
7079

7180
# Discovery message expiration time
72-
message-expiration = 90.minutes
81+
message-expiration = 1.minute
82+
83+
# Maximum amount a message can be expired by,
84+
# accounting for possible discrepancies between nodes' clocks.
85+
max-clock-drift = 15.seconds
86+
87+
# Maximum number of peers in each k-bucket.
88+
kademlia-bucket-size = 16
89+
90+
# Timeout for individual requests like Ping.
91+
request-timeout = 3.seconds
92+
93+
# Timeout to collect all possible responses for a FindNode request.
94+
kademlia-timeout = 7.seconds
7395

74-
# (TODO: remove me once full protocol is in place)
75-
scan-max-nodes = 20
96+
# Level of concurrency during lookups and enrollment.
97+
kademlia-alpha = 3
7698

77-
# (TODO: remove me once full protocol is in place)
78-
max-sent-neighbours = 10
99+
# Maximum number of messages in the queue associated with a UDP channel.
100+
channel-capacity = 100
79101
}
80102

81103
known-nodes {

src/main/resources/logback.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@
5656
<appender-ref ref="METRICS" />
5757
</root>
5858

59+
<logger name="io.netty" level="WARN"/>
60+
<logger name="io.iohk.scalanet" level="INFO" />
5961
<logger name="io.iohk.ethereum.network.rlpx.RLPxConnectionHandler" level="DEBUG" />
6062
<logger name="io.iohk.ethereum.blockchain.sync.SyncController" level="INFO" />
6163
<logger name="io.iohk.ethereum.network.PeerActor" level="DEBUG" />

src/main/scala/io/iohk/ethereum/faucet/jsonrpc/FaucetBuilder.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ trait SecureRandomBuilder {
6464
self: FaucetConfigBuilder =>
6565
lazy val secureRandom: SecureRandom =
6666
ConfigUtils
67-
.getOptionalValue(rawMantisConfig, "secure-random-algo", config => config.getString("secure-random-algo"))
67+
.getOptionalValue(rawMantisConfig, _.getString, "secure-random-algo")
6868
.flatMap(name => Try { SecureRandom.getInstance(name) }.toOption)
6969
.getOrElse(new SecureRandom())
7070
}

src/main/scala/io/iohk/ethereum/jsonrpc/server/http/JsonRpcHttpServer.scala

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@ import monix.eval.Task
1919
import monix.execution.Scheduler.Implicits.global
2020
import org.json4s.{DefaultFormats, JInt, native}
2121

22-
import scala.util.Try
23-
2422
trait JsonRpcHttpServer extends Json4sSupport {
2523
val jsonRpcController: JsonRpcBaseController
2624
val jsonRpcHealthChecker: JsonRpcHealthChecker
@@ -134,15 +132,12 @@ object JsonRpcHttpServer extends Logger {
134132

135133
override val corsAllowedOrigins = ConfigUtils.parseCorsAllowedOrigins(rpcHttpConfig, "cors-allowed-origins")
136134

137-
override val certificateKeyStorePath: Option[String] = Try(
138-
rpcHttpConfig.getString("certificate-keystore-path")
139-
).toOption
140-
override val certificateKeyStoreType: Option[String] = Try(
141-
rpcHttpConfig.getString("certificate-keystore-type")
142-
).toOption
143-
override val certificatePasswordFile: Option[String] = Try(
144-
rpcHttpConfig.getString("certificate-password-file")
145-
).toOption
135+
override val certificateKeyStorePath: Option[String] =
136+
ConfigUtils.getOptionalValue(rpcHttpConfig, _.getString, "certificate-keystore-path")
137+
override val certificateKeyStoreType: Option[String] =
138+
ConfigUtils.getOptionalValue(rpcHttpConfig, _.getString, "certificate-keystore-type")
139+
override val certificatePasswordFile: Option[String] =
140+
ConfigUtils.getOptionalValue(rpcHttpConfig, _.getString, "certificate-password-file")
146141
}
147142
}
148143
}

src/main/scala/io/iohk/ethereum/network/PeerManagerActor.scala

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,12 @@ class PeerManagerActor(
4141
/**
4242
* Maximum number of blacklisted nodes will never be larger than number of peers provided by discovery
4343
* Discovery provides remote nodes from all networks (ETC,ETH, Mordor etc.) only during handshake we learn that some
44-
* of the remote nodes are not compatible that's why we mark them as useless (blacklist them)
44+
* of the remote nodes are not compatible that's why we mark them as useless (blacklist them).
45+
*
46+
* The number of nodes in the current discovery is unlimited, but a guide may be the size of the routing table:
47+
* one bucket for each bit in the hash of the public key, times the bucket size.
4548
*/
46-
override val maxBlacklistedNodes: Int = discoveryConfig.nodesLimit
49+
override val maxBlacklistedNodes: Int = 32 * 8 * discoveryConfig.kademliaBucketSize
4750

4851
import PeerManagerActor._
4952
import akka.pattern.{ask, pipe}
@@ -96,23 +99,22 @@ class PeerManagerActor(
9699
log.debug("The known nodes list is empty")
97100
}
98101

99-
case PeerDiscoveryManager.DiscoveredNodesInfo(nodesInfo) =>
100-
val nodesToConnect = nodesInfo
101-
.filterNot { discoveryNodeInfo =>
102-
val socketAddress = discoveryNodeInfo.node.tcpSocketAddress
103-
val alreadyConnected = connectedPeers.isConnectionHandled(socketAddress) || connectedPeers.hasHandshakedWith(
104-
discoveryNodeInfo.node.id
105-
)
102+
case PeerDiscoveryManager.DiscoveredNodesInfo(nodes) =>
103+
val nodesToConnect = nodes
104+
.filterNot { node =>
105+
val socketAddress = node.tcpSocketAddress
106+
val alreadyConnected =
107+
connectedPeers.isConnectionHandled(socketAddress) || connectedPeers.hasHandshakedWith(node.id)
106108
alreadyConnected || isBlacklisted(PeerAddress(socketAddress.getHostString))
107109
} // not already connected to or blacklisted
108110
.take(peerConfiguration.maxOutgoingPeers - connectedPeers.outgoingPeersCount)
109111

110-
NetworkMetrics.DiscoveredPeersSize.set(nodesInfo.size)
112+
NetworkMetrics.DiscoveredPeersSize.set(nodes.size)
111113
NetworkMetrics.BlacklistedPeersSize.set(blacklistedPeers.size)
112114
NetworkMetrics.PendingPeersSize.set(connectedPeers.pendingPeersCount)
113115

114116
log.info(
115-
s"Discovered ${nodesInfo.size} nodes, " +
117+
s"Discovered ${nodes.size} nodes, " +
116118
s"Blacklisted ${blacklistedPeers.size} nodes, " +
117119
s"handshaked to ${connectedPeers.handshakedPeersCount}/${peerConfiguration.maxOutgoingPeers + peerConfiguration.maxIncomingPeers}, " +
118120
s"pending connection attempts ${connectedPeers.pendingPeersCount}. " +
@@ -121,7 +123,7 @@ class PeerManagerActor(
121123

122124
if (nodesToConnect.nonEmpty) {
123125
log.debug("Trying to connect to {} nodes", nodesToConnect.size)
124-
nodesToConnect.foreach(n => self ! ConnectToPeer(n.node.toUri))
126+
nodesToConnect.foreach(n => self ! ConnectToPeer(n.toUri))
125127
} else {
126128
log.debug("The nodes list is empty, no new nodes to connect to")
127129
}

src/main/scala/io/iohk/ethereum/network/discovery/DiscoveryConfig.scala

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,24 @@
11
package io.iohk.ethereum.network.discovery
22

3+
import io.iohk.ethereum.utils.ConfigUtils
34
import scala.concurrent.duration.FiniteDuration
45
import scala.concurrent.duration._
56

67
case class DiscoveryConfig(
78
discoveryEnabled: Boolean,
9+
host: Option[String],
810
interface: String,
911
port: Int,
1012
bootstrapNodes: Set[Node],
11-
nodesLimit: Int /* TODO: remove once proper discovery protocol is in place */,
12-
scanMaxNodes: Int /* TODO: remove once proper discovery protocol is in place */,
13-
maxNeighbours: Int /* TODO: remove once proper discovery protocol is in place */,
14-
scanInitialDelay: FiniteDuration,
13+
reuseKnownNodes: Boolean,
1514
scanInterval: FiniteDuration,
16-
messageExpiration: FiniteDuration
15+
messageExpiration: FiniteDuration,
16+
maxClockDrift: FiniteDuration,
17+
requestTimeout: FiniteDuration,
18+
kademliaTimeout: FiniteDuration,
19+
kademliaBucketSize: Int,
20+
kademliaAlpha: Int,
21+
channelCapacity: Int
1722
)
1823

1924
object DiscoveryConfig {
@@ -22,15 +27,19 @@ object DiscoveryConfig {
2227

2328
DiscoveryConfig(
2429
discoveryEnabled = discoveryConfig.getBoolean("discovery-enabled"),
30+
host = ConfigUtils.getOptionalValue(discoveryConfig, _.getString, "host"),
2531
interface = discoveryConfig.getString("interface"),
2632
port = discoveryConfig.getInt("port"),
2733
bootstrapNodes = NodeParser.parseNodes(bootstrapNodes),
28-
nodesLimit = discoveryConfig.getInt("nodes-limit"),
29-
scanMaxNodes = discoveryConfig.getInt("scan-max-nodes"),
30-
maxNeighbours = discoveryConfig.getInt("max-sent-neighbours"),
31-
scanInitialDelay = discoveryConfig.getDuration("scan-initial-delay").toMillis.millis,
34+
reuseKnownNodes = discoveryConfig.getBoolean("reuse-known-nodes"),
3235
scanInterval = discoveryConfig.getDuration("scan-interval").toMillis.millis,
33-
messageExpiration = discoveryConfig.getDuration("message-expiration").toMillis.millis
36+
messageExpiration = discoveryConfig.getDuration("message-expiration").toMillis.millis,
37+
maxClockDrift = discoveryConfig.getDuration("max-clock-drift").toMillis.millis,
38+
requestTimeout = discoveryConfig.getDuration("request-timeout").toMillis.millis,
39+
kademliaTimeout = discoveryConfig.getDuration("kademlia-timeout").toMillis.millis,
40+
kademliaBucketSize = discoveryConfig.getInt("kademlia-bucket-size"),
41+
kademliaAlpha = discoveryConfig.getInt("kademlia-alpha"),
42+
channelCapacity = discoveryConfig.getInt("channel-capacity")
3443
)
3544
}
3645

src/main/scala/io/iohk/ethereum/network/discovery/DiscoveryListener.scala

Lines changed: 0 additions & 58 deletions
This file was deleted.

0 commit comments

Comments
 (0)