-
Notifications
You must be signed in to change notification settings - Fork 863
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
remove v0 version of the database #5698
Changes from 3 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,16 +24,19 @@ | |
import org.hyperledger.besu.ethereum.core.Difficulty; | ||
import org.hyperledger.besu.ethereum.core.ExecutionContextTestFixture; | ||
import org.hyperledger.besu.ethereum.core.MessageFrameTestFixture; | ||
import org.hyperledger.besu.ethereum.storage.keyvalue.KeyValueSegmentIdentifier; | ||
import org.hyperledger.besu.evm.frame.MessageFrame; | ||
import org.hyperledger.besu.metrics.noop.NoOpMetricsSystem; | ||
import org.hyperledger.besu.plugin.services.storage.KeyValueStorage; | ||
import org.hyperledger.besu.plugin.services.storage.rocksdb.RocksDBMetricsFactory; | ||
import org.hyperledger.besu.plugin.services.storage.rocksdb.configuration.RocksDBConfigurationBuilder; | ||
import org.hyperledger.besu.plugin.services.storage.rocksdb.unsegmented.RocksDBKeyValueStorage; | ||
import org.hyperledger.besu.plugin.services.storage.rocksdb.segmented.OptimisticRocksDBColumnarKeyValueStorage; | ||
import org.hyperledger.besu.services.kvstore.SnappableSegmentedKeyValueStorageAdapter; | ||
|
||
import java.io.IOException; | ||
import java.nio.file.Files; | ||
import java.nio.file.Path; | ||
import java.util.List; | ||
|
||
import com.google.common.io.MoreFiles; | ||
import com.google.common.io.RecursiveDeleteOption; | ||
|
@@ -58,12 +61,18 @@ private OperationBenchmarkHelper( | |
|
||
public static OperationBenchmarkHelper create() throws IOException { | ||
final Path storageDirectory = Files.createTempDirectory("benchmark"); | ||
final KeyValueStorage keyValueStorage = | ||
new RocksDBKeyValueStorage( | ||
final OptimisticRocksDBColumnarKeyValueStorage optimisticRocksDBColumnarKeyValueStorage = | ||
new OptimisticRocksDBColumnarKeyValueStorage( | ||
Comment on lines
+64
to
+65
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Struggling to see the relevance of this change...KeyValueStorage still exists doesn't it? Or maybe we should delete KeyValueStorage too? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. looks like the change is it's now a two step process - KeyValueStorage (which is the interface used by plugins) is created from this storage There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yes we want to start a refactor of this part to be only segmented as we are only using that now. this one is the first PR and we will have more PRs after this one. We found a lot of code smell in this part when we wanted to change the code in order to have only one transaction to commit the worldstate |
||
new RocksDBConfigurationBuilder().databaseDir(storageDirectory).build(), | ||
List.of(KeyValueSegmentIdentifier.BLOCKCHAIN), | ||
emptyList(), | ||
new NoOpMetricsSystem(), | ||
RocksDBMetricsFactory.PUBLIC_ROCKS_DB_METRICS); | ||
|
||
final KeyValueStorage keyValueStorage = | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. KeyValueStorage still used here @siladu |
||
new SnappableSegmentedKeyValueStorageAdapter<>( | ||
KeyValueSegmentIdentifier.BLOCKCHAIN, optimisticRocksDBColumnarKeyValueStorage); | ||
|
||
final ExecutionContextTestFixture executionContext = | ||
ExecutionContextTestFixture.builder().blockchainKeyValueStorage(keyValueStorage).build(); | ||
final MutableBlockchain blockchain = executionContext.getBlockchain(); | ||
|
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done