Skip to content

Commit 101a363

Browse files
authored
[Chore] Remove unused iodb (#658)
1 parent 7fd3aa3 commit 101a363

File tree

12 files changed

+13
-281
lines changed

12 files changed

+13
-281
lines changed

build.sbt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ val dep = {
2727
"com.typesafe.akka" %% "akka-http-testkit" % akkaHttpVersion % "it,test",
2828
"io.suzaku" %% "boopickle" % "1.3.0",
2929
"org.ethereum" % "rocksdbjni" % rocksDb,
30-
"org.scorexfoundation" %% "iodb" % "0.3.0",
3130
"org.scalatest" %% "scalatest" % "3.0.5" % "it,test",
3231
"org.scalamock" %% "scalamock-scalatest-support" % "3.6.0" % "test",
3332
"org.scalacheck" %% "scalacheck" % "1.14.0" % "it,test",
@@ -45,8 +44,8 @@ val dep = {
4544
"org.bouncycastle" % "bcprov-jdk15on" % "1.59",
4645
"com.typesafe.scala-logging" %% "scala-logging" % "3.9.0",
4746
"org.typelevel" %% "mouse" % "0.18",
48-
4947
"com.twitter" %% "util-collection" % "18.5.0",
48+
"com.google.guava" % "guava" % "28.0-jre",
5049

5150
// mallet deps
5251
"org.jline" % "jline" % "3.1.2",

src/it/scala/io/iohk/ethereum/db/DataSourceIntegrationTestBehavior.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ trait DataSourceIntegrationTestBehavior
142142
val db = createDataSource(path).update(namespace = OtherNamespace, toRemove = Seq(), toUpsert = keyList.zip(keyList))
143143
db.destroy()
144144

145-
assert(!new File("/tmp/iodbDestroy").exists())
145+
assert(!new File(path).exists())
146146

147147
val dbAfterDestroy = createDataSource(path)
148148
keyList.foreach { key => assert(dbAfterDestroy.get(OtherNamespace, key).isEmpty) }

src/it/scala/io/iohk/ethereum/db/IodbDataSourceIntegrationSuite.scala

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

src/main/resources/application.conf

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -442,11 +442,6 @@ mantis {
442442
}
443443

444444
db {
445-
# IODB database is not currently used
446-
iodb {
447-
path = ${mantis.datadir}"/iodb/"
448-
}
449-
450445
rocksdb {
451446
# RocksDB data directory
452447
path = ${mantis.datadir}"/rocksdb/"
@@ -477,7 +472,7 @@ mantis {
477472
block-cache-size = 33554432
478473
}
479474

480-
# Define which database to use [rocksdb], iodb is not currently used
475+
# Define which database to use [rocksdb]
481476
data-source = "rocksdb"
482477
}
483478

src/main/scala/io/iohk/ethereum/db/components/SharedIodbDataSources.scala

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

src/main/scala/io/iohk/ethereum/db/components/Storages.scala

Lines changed: 0 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -55,50 +55,4 @@ object Storages {
5555

5656
}
5757
}
58-
59-
/**
60-
* As IODB required same length keys, we need a specific storage that pads integer values to be used as keys to match
61-
* keccak keys. See [[io.iohk.ethereum.db.storage.IodbBlockNumberMappingStorage]]
62-
*/
63-
trait IodbStorages extends StoragesComponent {
64-
dataSourcesComp: DataSourcesComponent with PruningModeComponent =>
65-
66-
override val storages = new DefaultBlockchainStorages(pruningMode)
67-
68-
class DefaultBlockchainStorages(override val pruningMode: PruningMode) extends Storages with AppCaches {
69-
70-
override val blockHeadersStorage: BlockHeadersStorage = new BlockHeadersStorage(dataSources.blockHeadersDataSource)
71-
72-
override val blockBodiesStorage: BlockBodiesStorage = new BlockBodiesStorage(dataSources.blockBodiesDataSource)
73-
74-
override val blockNumberMappingStorage: BlockNumberMappingStorage = new IodbBlockNumberMappingStorage(dataSources.blockHeightsHashesDataSource)
75-
76-
override val receiptStorage: ReceiptStorage = new ReceiptStorage(dataSources.receiptsDataSource)
77-
78-
override val nodeStorage: NodeStorage = new NodeStorage(dataSources.mptDataSource)
79-
80-
override val cachedNodeStorage: CachedNodeStorage = new CachedNodeStorage(nodeStorage, caches.nodeCache)
81-
82-
override val fastSyncStateStorage: FastSyncStateStorage = new FastSyncStateStorage(dataSources.fastSyncStateDataSource)
83-
84-
override val evmCodeStorage: EvmCodeStorage = new EvmCodeStorage(dataSources.evmCodeDataSource)
85-
86-
override val totalDifficultyStorage: TotalDifficultyStorage =
87-
new TotalDifficultyStorage(dataSources.totalDifficultyDataSource)
88-
89-
override val appStateStorage: AppStateStorage = new AppStateStorage(dataSources.appStateDataSource)
90-
91-
override val transactionMappingStorage: TransactionMappingStorage = new TransactionMappingStorage(dataSources.transactionMappingDataSource)
92-
93-
override val knownNodesStorage: KnownNodesStorage = new KnownNodesStorage(dataSources.knownNodesDataSource)
94-
95-
override val stateStorage: StateStorage =
96-
StateStorage(
97-
pruningMode,
98-
nodeStorage,
99-
cachedNodeStorage,
100-
new LruCache[NodeHash, HeapEntry](Config.InMemoryPruningNodeCacheConfig, Some(CachedReferenceCountedStorage.saveOnlyNotificationHandler(nodeStorage)))
101-
)
102-
}
103-
}
10458
}

src/main/scala/io/iohk/ethereum/db/dataSource/IodbDataSource.scala

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

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

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

src/main/scala/io/iohk/ethereum/utils/Config.scala

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -182,15 +182,10 @@ object Config {
182182
object Db {
183183

184184
private val dbConfig = config.getConfig("db")
185-
private val iodbConfig = dbConfig.getConfig("iodb")
186185
private val rocksDbConfig = dbConfig.getConfig("rocksdb")
187186

188187
val dataSource: String = dbConfig.getString("data-source")
189188

190-
object Iodb {
191-
val path: String = iodbConfig.getString("path")
192-
}
193-
194189
object RocksDb extends RocksDbConfig {
195190
override val createIfMissing: Boolean = rocksDbConfig.getBoolean("create-if-missing")
196191
override val paranoidChecks: Boolean = rocksDbConfig.getBoolean("paranoid-checks")

src/snappy/resources/example.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ snappy {
1515
# Path to the DB snapshot that contains all the blocks to be executed (and state for single-db)
1616
source-db-path = "path/to/source-db"
1717

18-
# Data source that should be used [rocksdb], iodb is not currently used
18+
# Data source that should be used [rocksdb]
1919
data-source = "rocksdb"
2020

2121
# Path to the DB where the state resulting from execution is saved (for single-db this is ignored)

0 commit comments

Comments
 (0)