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)

src/test/scala/io/iohk/ethereum/db/dataSource/IodbDataSourceTest.scala

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

verify.sbt

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,6 @@ verifyDependencies in verify ++= Seq(
3030
"org.scala-lang.modules" % "scala-parser-combinators" sha1 "bbce493f8bf61b56623624ff96ac3865f7f6999a",
3131
"io.suzaku" % "boopickle" sha1 "a1cd66dfb24325d11cb38c340b7663e1ee4ed70e",
3232
"org.ethereum" % "rocksdbjni" sha1 "63e2b8b137c967ec15049f1f66b9d987e8f4beb7",
33-
"org.scorexfoundation" % "iodb" sha1 "0d4b86fe17008bfc5ec0fe4317d6d9c39a81dc85",
34-
"net.jpountz.lz4" % "lz4" sha1 "c708bb2590c0652a642236ef45d9f99ff842a2ce",
3533
"ch.qos.logback" % "logback-classic" sha1 "7c4f3c474fb2c041d8028740440937705ebb473a",
3634
"ch.qos.logback" % "logback-core" sha1 "864344400c3d4d92dfeb0a305dc87d953677c03c",
3735
"org.jline" % "jline" sha1 "dfb4e9e15e981634155ce063fa697b2b8964d507",
@@ -59,7 +57,15 @@ verifyDependencies in verify ++= Seq(
5957
"com.twitter" % "util-collection" sha1 "8c62e0dc1a7bccd094ea3cfed23fe67ddd3a5590",
6058
"com.twitter" % "util-core" sha1 "ff2e5929ac0e26d1c8cfac00384707e8c6accb01",
6159
"com.twitter" % "util-function" sha1 "2b24ea268e08431eec442a510bf2a05f1d5a1a3b",
62-
"com.google.guava" % "guava" sha1 "6ce200f6b23222af3d8abb6b6459e6c44f4bb0e9",
60+
"com.google.guava" % "guava" sha1 "54fed371b4b8a8cce1e94a9abd9620982d3aa54b",
61+
"com.google.guava" % "failureaccess" sha1 "1dcf1de382a0bf95a3d8b0849546c88bac1292c9",
62+
"com.google.guava" % "listenablefuture" sha1 "b421526c5f297295adef1c886e5246c39d4ac629",
63+
"com.google.code.findbugs" % "jsr305" sha1 "25ea2e8b0c338a877313bd4672d3fe056ea78f0d",
64+
"org.checkerframework" % "checker-qual" sha1 "eb2e8ab75598548cc8acf9a1ca227e480e01881e",
65+
"com.google.errorprone" % "error_prone_annotations" sha1 "d1a0c5032570e0f64be6b4d9c90cdeb103129029",
66+
"com.google.j2objc" % "j2objc-annotations" sha1 "ba035118bc8bac37d7eff77700720999acd9986d",
67+
"org.codehaus.mojo" % "animal-sniffer-annotations" sha1 "f97ce6decaea32b36101e37979f8b647f00681fb",
68+
6369
"com.github.scopt" % "scopt" sha1 "e078455e1a65597146f8608dab3247bf1eb92e6e",
6470
"com.datadoghq" % "java-dogstatsd-client" sha1 "a9380127a42855a76af7787840a3a04b9fc4ce20",
6571
"org.xerial.snappy" % "snappy-java" sha1 "307b286efd119ad2c6d4291128bf110bddc68088"

0 commit comments

Comments
 (0)