Skip to content

Commit 0c324a0

Browse files
committed
[ETCM-197] Move all fast sync components to separate package
1 parent 057f84c commit 0c324a0

29 files changed

+82
-78
lines changed

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

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ import java.util.concurrent.atomic.AtomicReference
66
import akka.actor.{ActorRef, ActorSystem}
77
import akka.testkit.TestProbe
88
import akka.util.{ByteString, Timeout}
9-
import io.iohk.ethereum.blockchain.sync.regular.BlockBroadcasterActor
9+
import io.iohk.ethereum.blockchain.sync.regular.{BlockBroadcast, BlockBroadcasterActor}
1010
import io.iohk.ethereum.blockchain.sync.regular.BlockBroadcasterActor.BroadcastBlock
11-
import io.iohk.ethereum.blockchain.sync.{BlockBroadcast, BlockchainHostActor, TestSyncConfig}
11+
import io.iohk.ethereum.blockchain.sync.{BlockchainHostActor, TestSyncConfig}
1212
import io.iohk.ethereum.db.components.{RocksDbDataSourceComponent, Storages}
1313
import io.iohk.ethereum.db.dataSource.{RocksDbConfig, RocksDbDataSource}
1414
import io.iohk.ethereum.db.storage.pruning.{ArchivePruning, PruningMode}
@@ -19,20 +19,13 @@ 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}
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
2626
import io.iohk.ethereum.network.rlpx.AuthHandshaker
2727
import io.iohk.ethereum.network.rlpx.RLPxConnectionHandler.RLPxConfiguration
28-
import io.iohk.ethereum.network.{
29-
EtcPeerManagerActor,
30-
ForkResolver,
31-
KnownNodesManager,
32-
PeerEventBusActor,
33-
PeerManagerActor,
34-
ServerActor
35-
}
28+
import io.iohk.ethereum.network.{EtcPeerManagerActor, ForkResolver, KnownNodesManager, PeerEventBusActor, PeerManagerActor, ServerActor}
3629
import io.iohk.ethereum.nodebuilder.{PruningConfigBuilder, SecureRandomBuilder}
3730
import io.iohk.ethereum.sync.util.SyncCommonItSpec._
3831
import io.iohk.ethereum.sync.util.SyncCommonItSpecUtils._

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@ package io.iohk.ethereum.sync.util
33
import akka.util.ByteString
44
import cats.effect.Resource
55
import io.iohk.ethereum.Mocks.MockValidatorsAlwaysSucceed
6-
import io.iohk.ethereum.blockchain.sync.{FastSync, SyncProtocol}
7-
import io.iohk.ethereum.blockchain.sync.FastSync.SyncState
6+
import io.iohk.ethereum.blockchain.sync.SyncProtocol
7+
import io.iohk.ethereum.blockchain.sync.fast.FastSync
8+
import io.iohk.ethereum.blockchain.sync.fast.FastSync.SyncState
89
import io.iohk.ethereum.crypto.kec256
910
import io.iohk.ethereum.domain.Address
1011
import io.iohk.ethereum.mpt.{HashNode, MptNode, MptTraversals}

src/main/scala/io/iohk/ethereum/blockchain/sync/SyncController.scala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package io.iohk.ethereum.blockchain.sync
22

33
import akka.actor.{Actor, ActorLogging, ActorRef, PoisonPill, Props, Scheduler}
4+
import io.iohk.ethereum.blockchain.sync.fast.FastSync
45
import io.iohk.ethereum.blockchain.sync.regular.RegularSync
56
import io.iohk.ethereum.consensus.blocks.CheckpointBlockGenerator
67
import io.iohk.ethereum.consensus.validators.Validators

src/main/scala/io/iohk/ethereum/blockchain/sync/DownloaderState.scala renamed to src/main/scala/io/iohk/ethereum/blockchain/sync/fast/DownloaderState.scala

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
1-
package io.iohk.ethereum.blockchain.sync
1+
package io.iohk.ethereum.blockchain.sync.fast
22

33
import akka.util.ByteString
44
import cats.data.NonEmptyList
5-
import io.iohk.ethereum.blockchain.sync.SyncStateScheduler.SyncResponse
6-
import io.iohk.ethereum.blockchain.sync.SyncStateSchedulerActor.{
5+
import io.iohk.ethereum.blockchain.sync.fast.SyncStateScheduler.SyncResponse
6+
import io.iohk.ethereum.blockchain.sync.fast.SyncStateSchedulerActor.{
77
NoUsefulDataInResponse,
88
PeerRequest,
99
ResponseProcessingResult,
1010
UnrequestedResponse,
1111
UsefulData
1212
}
1313
import io.iohk.ethereum.crypto.kec256
14-
import io.iohk.ethereum.network.{Peer, PeerId}
1514
import io.iohk.ethereum.network.p2p.messages.PV63.NodeData
15+
import io.iohk.ethereum.network.{Peer, PeerId}
1616

1717
import scala.annotation.tailrec
1818

src/main/scala/io/iohk/ethereum/blockchain/sync/FastSync.scala renamed to src/main/scala/io/iohk/ethereum/blockchain/sync/fast/FastSync.scala

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
1-
package io.iohk.ethereum.blockchain.sync
1+
package io.iohk.ethereum.blockchain.sync.fast
22

33
import java.time.Instant
4+
45
import akka.actor._
56
import akka.util.ByteString
67
import cats.data.NonEmptyList
7-
import io.iohk.ethereum.blockchain.sync.FastSyncReceiptsValidator.ReceiptsValidationResult
88
import io.iohk.ethereum.blockchain.sync.PeerRequestHandler.ResponseReceived
9-
import io.iohk.ethereum.blockchain.sync.SyncBlocksValidator.BlockBodyValidationResult
109
import io.iohk.ethereum.blockchain.sync.SyncProtocol.Status.Progress
11-
import io.iohk.ethereum.blockchain.sync.SyncStateSchedulerActor.{
10+
import io.iohk.ethereum.blockchain.sync._
11+
import io.iohk.ethereum.blockchain.sync.fast.ReceiptsValidator.ReceiptsValidationResult
12+
import io.iohk.ethereum.blockchain.sync.fast.SyncBlocksValidator.BlockBodyValidationResult
13+
import io.iohk.ethereum.blockchain.sync.fast.SyncStateSchedulerActor.{
1214
RestartRequested,
1315
StartSyncingTo,
1416
StateSyncFinished,
@@ -25,6 +27,7 @@ import io.iohk.ethereum.network.p2p.messages.PV63._
2527
import io.iohk.ethereum.utils.ByteStringUtils
2628
import io.iohk.ethereum.utils.Config.SyncConfig
2729
import org.bouncycastle.util.encoders.Hex
30+
2831
import scala.annotation.tailrec
2932
import scala.concurrent.ExecutionContext.Implicits.global
3033
import scala.concurrent.duration._
@@ -44,7 +47,7 @@ class FastSync(
4447
with ActorLogging
4548
with PeerListSupport
4649
with BlacklistSupport
47-
with FastSyncReceiptsValidator
50+
with ReceiptsValidator
4851
with SyncBlocksValidator {
4952

5053
import FastSync._
@@ -122,7 +125,7 @@ class FastSync(
122125
private var requestedBlockBodies: Map[ActorRef, Seq[ByteString]] = Map.empty
123126
private var requestedReceipts: Map[ActorRef, Seq[ByteString]] = Map.empty
124127

125-
private val syncStateStorageActor = context.actorOf(Props[FastSyncStateStorageActor], "state-storage")
128+
private val syncStateStorageActor = context.actorOf(Props[StateStorageActor], "state-storage")
126129

127130
syncStateStorageActor ! fastSyncStateStorage
128131

@@ -626,7 +629,7 @@ class FastSync(
626629
}
627630

628631
def processSyncing(): Unit = {
629-
FastSyncMetrics.measure(syncState)
632+
SyncMetrics.measure(syncState)
630633
if (fullySynced) {
631634
finish()
632635
} else {

src/main/scala/io/iohk/ethereum/blockchain/sync/LoadableBloomFilter.scala renamed to src/main/scala/io/iohk/ethereum/blockchain/sync/fast/LoadableBloomFilter.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
package io.iohk.ethereum.blockchain.sync
1+
package io.iohk.ethereum.blockchain.sync.fast
22

33
import com.google.common.hash.{BloomFilter, Funnel}
4-
import io.iohk.ethereum.blockchain.sync.LoadableBloomFilter.BloomFilterLoadingResult
4+
import io.iohk.ethereum.blockchain.sync.fast.LoadableBloomFilter.BloomFilterLoadingResult
55
import io.iohk.ethereum.db.dataSource.RocksDbDataSource.IterationError
66
import monix.eval.Task
77
import monix.reactive.{Consumer, Observable}

src/main/scala/io/iohk/ethereum/blockchain/sync/PivotBlockSelector.scala renamed to src/main/scala/io/iohk/ethereum/blockchain/sync/fast/PivotBlockSelector.scala

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
package io.iohk.ethereum.blockchain.sync
1+
package io.iohk.ethereum.blockchain.sync.fast
22

33
import akka.actor.{Actor, ActorLogging, ActorRef, Cancellable, Props, Scheduler}
44
import akka.util.ByteString
5+
import io.iohk.ethereum.blockchain.sync.{BlacklistSupport, PeerListSupport}
56
import io.iohk.ethereum.domain.BlockHeader
67
import io.iohk.ethereum.network.EtcPeerManagerActor.PeerInfo
78
import io.iohk.ethereum.network.PeerEventBusActor.PeerEvent.MessageFromPeer
@@ -10,6 +11,7 @@ import io.iohk.ethereum.network.PeerEventBusActor.{PeerSelector, Subscribe, Unsu
1011
import io.iohk.ethereum.network.p2p.messages.PV62.{BlockHeaders, GetBlockHeaders}
1112
import io.iohk.ethereum.network.{EtcPeerManagerActor, Peer, PeerId}
1213
import io.iohk.ethereum.utils.Config.SyncConfig
14+
1315
import scala.concurrent.ExecutionContext.Implicits.global
1416
import scala.concurrent.duration.FiniteDuration
1517

src/main/scala/io/iohk/ethereum/blockchain/sync/FastSyncReceiptsValidator.scala renamed to src/main/scala/io/iohk/ethereum/blockchain/sync/fast/ReceiptsValidator.scala

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
package io.iohk.ethereum.blockchain.sync
1+
package io.iohk.ethereum.blockchain.sync.fast
22

33
import akka.util.ByteString
44
import io.iohk.ethereum.consensus.validators.Validators
5-
import io.iohk.ethereum.domain.{Blockchain, Receipt}
65
import io.iohk.ethereum.consensus.validators.std.StdBlockValidator.BlockError
6+
import io.iohk.ethereum.domain.{Blockchain, Receipt}
77

8-
trait FastSyncReceiptsValidator {
8+
trait ReceiptsValidator {
99

10-
import FastSyncReceiptsValidator._
10+
import ReceiptsValidator._
1111
import ReceiptsValidationResult._
1212

1313
def blockchain: Blockchain
@@ -37,7 +37,7 @@ trait FastSyncReceiptsValidator {
3737

3838
}
3939

40-
object FastSyncReceiptsValidator {
40+
object ReceiptsValidator {
4141
sealed trait ReceiptsValidationResult
4242
object ReceiptsValidationResult {
4343
case class Valid(blockHashesAndReceipts: Seq[(ByteString, Seq[Receipt])]) extends ReceiptsValidationResult

src/main/scala/io/iohk/ethereum/blockchain/sync/FastSyncStateStorageActor.scala renamed to src/main/scala/io/iohk/ethereum/blockchain/sync/fast/StateStorageActor.scala

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
package io.iohk.ethereum.blockchain.sync
1+
package io.iohk.ethereum.blockchain.sync.fast
22

33
import akka.actor.{Actor, ActorLogging}
44
import akka.pattern.pipe
5-
import io.iohk.ethereum.blockchain.sync.FastSync.SyncState
6-
import io.iohk.ethereum.blockchain.sync.FastSyncStateStorageActor.GetStorage
5+
import io.iohk.ethereum.blockchain.sync.fast.FastSync.SyncState
6+
import io.iohk.ethereum.blockchain.sync.fast.StateStorageActor.GetStorage
77
import io.iohk.ethereum.db.storage.FastSyncStateStorage
88

99
import scala.concurrent.Future
@@ -15,7 +15,7 @@ import scala.util.{Failure, Success, Try}
1515
* was persisted.
1616
* If during persisting more than one new state is received then only the last state will be kept in queue.
1717
*/
18-
class FastSyncStateStorageActor extends Actor with ActorLogging {
18+
class StateStorageActor extends Actor with ActorLogging {
1919

2020
def receive: Receive = {
2121
// after initialization send a valid Storage reference
@@ -62,6 +62,6 @@ class FastSyncStateStorageActor extends Actor with ActorLogging {
6262

6363
}
6464

65-
object FastSyncStateStorageActor {
65+
object StateStorageActor {
6666
case object GetStorage
6767
}

src/main/scala/io/iohk/ethereum/blockchain/sync/SyncBlocksValidator.scala renamed to src/main/scala/io/iohk/ethereum/blockchain/sync/fast/SyncBlocksValidator.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
package io.iohk.ethereum.blockchain.sync
1+
package io.iohk.ethereum.blockchain.sync.fast
22

33
import akka.util.ByteString
44
import io.iohk.ethereum.consensus.validators.Validators
55
import io.iohk.ethereum.consensus.validators.std.StdBlockValidator
6-
import io.iohk.ethereum.domain.{BlockHeader, BlockBody, Blockchain}
76
import io.iohk.ethereum.consensus.validators.std.StdBlockValidator.BlockValid
7+
import io.iohk.ethereum.domain.{BlockBody, BlockHeader, Blockchain}
88

99
trait SyncBlocksValidator {
1010

src/main/scala/io/iohk/ethereum/blockchain/sync/FastSyncMetrics.scala renamed to src/main/scala/io/iohk/ethereum/blockchain/sync/fast/SyncMetrics.scala

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
package io.iohk.ethereum.blockchain.sync
1+
package io.iohk.ethereum.blockchain.sync.fast
22

33
import java.util.concurrent.atomic.AtomicLong
44

5-
import io.iohk.ethereum.blockchain.sync.FastSync.SyncState
6-
import io.iohk.ethereum.metrics.MetricsContainer
75
import com.google.common.util.concurrent.AtomicDouble
6+
import io.iohk.ethereum.blockchain.sync.fast.FastSync.SyncState
7+
import io.iohk.ethereum.metrics.MetricsContainer
88

9-
object FastSyncMetrics extends MetricsContainer {
9+
object SyncMetrics extends MetricsContainer {
1010

1111
private[this] final val PivotBlockNumberGauge =
1212
metrics.registry.gauge("fastsync.block.pivotBlock.number.gauge", new AtomicDouble(0d))

src/main/scala/io/iohk/ethereum/blockchain/sync/SyncSchedulerActorState.scala renamed to src/main/scala/io/iohk/ethereum/blockchain/sync/fast/SyncSchedulerActorState.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
package io.iohk.ethereum.blockchain.sync
1+
package io.iohk.ethereum.blockchain.sync.fast
22

33
import akka.actor.ActorRef
44
import akka.util.ByteString
55
import cats.data.NonEmptyList
6-
import io.iohk.ethereum.blockchain.sync.SyncStateScheduler.{ProcessingStatistics, SchedulerState}
7-
import io.iohk.ethereum.blockchain.sync.SyncStateSchedulerActor.{PeerRequest, RequestResult}
6+
import io.iohk.ethereum.blockchain.sync.fast.SyncStateScheduler.{ProcessingStatistics, SchedulerState}
7+
import io.iohk.ethereum.blockchain.sync.fast.SyncStateSchedulerActor.{PeerRequest, RequestResult}
88
import io.iohk.ethereum.network.{Peer, PeerId}
99

1010
import scala.collection.immutable.Queue

src/main/scala/io/iohk/ethereum/blockchain/sync/SyncStateScheduler.scala renamed to src/main/scala/io/iohk/ethereum/blockchain/sync/fast/SyncStateScheduler.scala

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
package io.iohk.ethereum.blockchain.sync
1+
package io.iohk.ethereum.blockchain.sync.fast
22

33
import java.util.Comparator
44

55
import akka.util.ByteString
66
import com.google.common.hash.{BloomFilter, Funnel, PrimitiveSink}
7-
import io.iohk.ethereum.blockchain.sync.LoadableBloomFilter.BloomFilterLoadingResult
8-
import io.iohk.ethereum.blockchain.sync.SyncStateScheduler._
7+
import io.iohk.ethereum.blockchain.sync.fast.LoadableBloomFilter.BloomFilterLoadingResult
8+
import io.iohk.ethereum.blockchain.sync.fast.SyncStateScheduler._
99
import io.iohk.ethereum.domain.{Account, Blockchain}
1010
import io.iohk.ethereum.mpt.{BranchNode, ExtensionNode, HashNode, LeafNode, MerklePatriciaTrie, MptNode}
11+
import io.iohk.ethereum.network.p2p.messages.PV63.MptNodeEncoders.MptNodeDec
1112
import io.vavr.collection.PriorityQueue
12-
import io.iohk.ethereum.network.p2p.messages.PV63.MptNodeEncoders._
1313
import monix.eval.Task
1414

1515
import scala.annotation.tailrec

src/main/scala/io/iohk/ethereum/blockchain/sync/SyncStateSchedulerActor.scala renamed to src/main/scala/io/iohk/ethereum/blockchain/sync/fast/SyncStateSchedulerActor.scala

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,25 @@
1-
package io.iohk.ethereum.blockchain.sync
1+
package io.iohk.ethereum.blockchain.sync.fast
22

33
import akka.actor.{Actor, ActorLogging, ActorRef, Props, Timers}
44
import akka.pattern.pipe
55
import akka.util.ByteString
66
import cats.data.NonEmptyList
7-
import io.iohk.ethereum.blockchain.sync.LoadableBloomFilter.BloomFilterLoadingResult
87
import io.iohk.ethereum.blockchain.sync.PeerRequestHandler.ResponseReceived
9-
import io.iohk.ethereum.blockchain.sync.SyncStateScheduler.{
8+
import io.iohk.ethereum.blockchain.sync.fast.LoadableBloomFilter.BloomFilterLoadingResult
9+
import io.iohk.ethereum.blockchain.sync.fast.SyncStateScheduler.{
1010
CriticalError,
1111
ProcessingStatistics,
1212
SchedulerState,
1313
SyncResponse
1414
}
15-
import io.iohk.ethereum.blockchain.sync.SyncStateSchedulerActor._
15+
import io.iohk.ethereum.blockchain.sync.fast.SyncStateSchedulerActor._
16+
import io.iohk.ethereum.blockchain.sync.{BlacklistSupport, PeerListSupport, PeerRequestHandler}
1617
import io.iohk.ethereum.network.Peer
1718
import io.iohk.ethereum.network.p2p.messages.PV63.{GetNodeData, NodeData}
1819
import io.iohk.ethereum.utils.ByteStringUtils
1920
import io.iohk.ethereum.utils.Config.SyncConfig
2021
import monix.execution.Scheduler
22+
2123
import scala.concurrent.Future
2224
import scala.concurrent.duration._
2325

src/main/scala/io/iohk/ethereum/blockchain/sync/BlockBroadcast.scala renamed to src/main/scala/io/iohk/ethereum/blockchain/sync/regular/BlockBroadcast.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
package io.iohk.ethereum.blockchain.sync
1+
package io.iohk.ethereum.blockchain.sync.regular
22

33
import akka.actor.ActorRef
4-
import io.iohk.ethereum.network.{EtcPeerManagerActor, Peer}
54
import io.iohk.ethereum.network.EtcPeerManagerActor.PeerInfo
65
import io.iohk.ethereum.network.p2p.messages.CommonMessages.NewBlock
76
import io.iohk.ethereum.network.p2p.messages.PV62
87
import io.iohk.ethereum.network.p2p.messages.PV62.BlockHash
8+
import io.iohk.ethereum.network.{EtcPeerManagerActor, Peer}
99
import io.iohk.ethereum.utils.Config.SyncConfig
1010

1111
import scala.util.Random

src/main/scala/io/iohk/ethereum/blockchain/sync/regular/BlockBroadcasterActor.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package io.iohk.ethereum.blockchain.sync.regular
22

33
import akka.actor.{Actor, ActorLogging, ActorRef, Props, Scheduler}
4-
import io.iohk.ethereum.blockchain.sync.{BlacklistSupport, BlockBroadcast, PeerListSupport}
4+
import io.iohk.ethereum.blockchain.sync.{BlacklistSupport, PeerListSupport}
55
import io.iohk.ethereum.network.p2p.messages.CommonMessages.NewBlock
66
import io.iohk.ethereum.utils.Config.SyncConfig
77

src/main/scala/io/iohk/ethereum/blockchain/sync/regular/RegularSync.scala

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,11 @@ package io.iohk.ethereum.blockchain.sync.regular
22

33
import akka.actor.{Actor, ActorLogging, ActorRef, AllForOneStrategy, Cancellable, Props, Scheduler, SupervisorStrategy}
44
import akka.util.ByteString
5-
import io.iohk.ethereum.blockchain.sync.{BlockBroadcast, SyncProtocol}
5+
import io.iohk.ethereum.blockchain.sync.SyncProtocol
66
import io.iohk.ethereum.blockchain.sync.SyncProtocol.Status
77
import io.iohk.ethereum.blockchain.sync.SyncProtocol.Status.Progress
88
import io.iohk.ethereum.blockchain.sync.regular.RegularSync.{NewCheckpoint, ProgressProtocol, ProgressState}
99
import io.iohk.ethereum.blockchain.sync.regular.BlockFetcher.InternalLastBlockImport
10-
import io.iohk.ethereum.blockchain.sync.BlockBroadcast
1110
import io.iohk.ethereum.consensus.blocks.CheckpointBlockGenerator
1211
import io.iohk.ethereum.crypto.ECDSASignature
1312
import io.iohk.ethereum.domain.Blockchain

src/main/scala/io/iohk/ethereum/db/storage/FastSyncStateStorage.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import java.nio.ByteBuffer
55
import akka.util.ByteString
66
import boopickle.CompositePickler
77
import boopickle.Default._
8-
import io.iohk.ethereum.blockchain.sync.FastSync._
8+
import io.iohk.ethereum.blockchain.sync.fast.FastSync._
99
import io.iohk.ethereum.db.dataSource.DataSource
1010
import io.iohk.ethereum.utils.ByteUtils.compactPickledBytes
1111

src/test/scala/io/iohk/ethereum/blockchain/sync/BlockBroadcastSpec.scala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import java.net.InetSocketAddress
44

55
import akka.actor.ActorSystem
66
import akka.testkit.{TestKit, TestProbe}
7+
import io.iohk.ethereum.blockchain.sync.regular.BlockBroadcast
78
import io.iohk.ethereum.{Fixtures, WithActorSystemShutDown}
89
import io.iohk.ethereum.domain.{Block, BlockBody, BlockHeader, ChainWeight}
910
import io.iohk.ethereum.network.{EtcPeerManagerActor, Peer}

src/test/scala/io/iohk/ethereum/blockchain/sync/FastSyncSpec.scala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import io.iohk.ethereum.{FreeSpecBase, ObjectGenerators, SpecFixtures, WithActor
1212
import monix.eval.Task
1313
import monix.reactive.Observable
1414
import io.iohk.ethereum.BlockHelpers
15+
import io.iohk.ethereum.blockchain.sync.fast.FastSync
1516
import io.iohk.ethereum.domain.ChainWeight
1617

1718
import scala.concurrent.duration.DurationInt

src/test/scala/io/iohk/ethereum/blockchain/sync/LoadableBloomFilterSpec.scala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package io.iohk.ethereum.blockchain.sync
22

33
import com.google.common.hash.{Funnel, Funnels, PrimitiveSink}
44
import io.iohk.ethereum.FlatSpecBase
5+
import io.iohk.ethereum.blockchain.sync.fast.LoadableBloomFilter
56
import io.iohk.ethereum.db.dataSource.RocksDbDataSource.IterationError
67
import monix.eval.Task
78
import monix.reactive.Observable

src/test/scala/io/iohk/ethereum/blockchain/sync/PivotBlockSelectorSpec.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import akka.actor.{ActorRef, ActorSystem}
44
import akka.testkit.{TestKit, TestProbe}
55
import akka.util.ByteString
66
import com.miguno.akka.testing.VirtualTime
7-
import io.iohk.ethereum.blockchain.sync.PivotBlockSelector.{Result, SelectPivotBlock}
7+
import io.iohk.ethereum.blockchain.sync.fast.PivotBlockSelector.{Result, SelectPivotBlock}
88
import io.iohk.ethereum.domain.{BlockHeader, ChainWeight}
99
import io.iohk.ethereum.network.EtcPeerManagerActor.{HandshakedPeers, PeerInfo}
1010
import io.iohk.ethereum.network.PeerEventBusActor.PeerEvent.MessageFromPeer
@@ -18,6 +18,7 @@ import io.iohk.ethereum.utils.Config.SyncConfig
1818
import io.iohk.ethereum.{Fixtures, WithActorSystemShutDown}
1919
import java.net.InetSocketAddress
2020

21+
import io.iohk.ethereum.blockchain.sync.fast.PivotBlockSelector
2122
import org.scalatest.BeforeAndAfter
2223
import org.scalatest.flatspec.AnyFlatSpecLike
2324
import org.scalatest.matchers.should.Matchers

0 commit comments

Comments
 (0)