temporary commit: add importer-offline storage #1884
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR Type
Enhancement
Description
ImporterOfflineStorage
implementation for theStorage
trait.Arc<dyn Storage>
instead ofArc<StratusStorage>
.Storage
trait to beSend + Sync + 'static
.StorageConfig
to support initializing different storage implementations.ImporterOfflineStorage
as a new variant to theStorageKind
enum.Changes walkthrough 📝
13 files
evm.rs
Refactor EVM to use dynamic Storage trait
src/eth/executor/evm.rs
StratusStorage
todyn Storage
inEvm::new
andRevmSession::new
methods
storage
field type inRevmSession
struct toArc
executor.rs
Update Executor to use dynamic Storage trait
src/eth/executor/executor.rs
storage
parameter type fromArc
toArc
inEvms::spawn
andevm_loop
functionsstorage
field type inExecutor
struct toArc
Executor::new
method to acceptArc
instead ofArc
executor_config.rs
Refactor ExecutorConfig to use dynamic Storage
src/eth/executor/executor_config.rs
Storage
traitExecutorConfig::init
method to acceptArc
instead of
Arc
importer.rs
Update Importer to use dynamic Storage trait
src/eth/follower/importer/importer.rs
storage
field type inImporter
struct toArc
Importer::new
method to acceptArc
instead ofArc
importer_config.rs
Refactor ImporterConfig to use dynamic Storage
src/eth/follower/importer/importer_config.rs
Storage
traitImporterConfig::init
andinit_follower
methods to acceptArc
instead ofArc
miner.rs
Update Miner to use dynamic Storage trait
src/eth/miner/miner.rs
storage
field type inMiner
struct toArc
Miner::new
method to acceptArc
instead ofArc
miner_config.rs
Refactor MinerConfig to use dynamic Storage
src/eth/miner/miner_config.rs
Storage
traitMinerConfig::init
andinit_with_mode
methods to acceptArc
instead ofArc
log_filter.rs
Update log filter to use dynamic Storage
src/eth/primitives/log_filter.rs
Storage
traitbuild_filter
function to useArc
instead ofArc
log_filter_input.rs
Refactor LogFilterInput to use dynamic Storage
src/eth/primitives/log_filter_input.rs
parse
method parameter type from&Arc<StratusStorage>
to&Arc<dyn Storage>
rpc_context.rs
Update RpcContext to use dynamic Storage trait
src/eth/rpc/rpc_context.rs
Storage
traitstorage
field type inRpcContext
struct toArc
rpc_server.rs
Refactor RPC server to use dynamic Storage
src/eth/rpc/rpc_server.rs
serve_rpc
function to acceptArc<dyn Storage>
instead ofArc<StratusStorage>
importer_offline_storage.rs
Implement ImporterOfflineStorage
src/eth/storage/importer_offline_storage.rs
ImporterOfflineStorage
structStorage
trait forImporterOfflineStorage
operations, and block operations
mod.rs
Update Storage module with new ImporterOfflineStorage
src/eth/storage/mod.rs
importer_offline_storage
moduleStorage
trait to beSend + Sync + 'static
StorageConfig::init
to returnArc
ImporterOfflineStorage
variant toStorageKind
enum