rpcdaemon: move transaction/cursor hierarchy to db #2136
Merged
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.
This PR moves almost all the code present in
rpc
module for accessing the data stores (i.e. database and snapshots) into thedb
module, specifically:rpc::ethdb::Transaction
andrpc::ethdb::Cursor
, capturing the abstractions to interact with local/remote transactions and cursorsrpc/storage
package, containing similar local/remote abstractions for block/header/body/transaction access layerrpc::state::LocalState
andrpc::state::RemoteState
, again local/remote modelling forsilkworm::State
implementationsThis refactoring is driven by the following logic:
db
module, because theKV
interface defines remote access to the data stores (i.e. database and snapshots), so it's exposed fromdb
KV
This work is not finished yet (some additional PR will follow) and should be considered as a starting point to further shaping the
db
module into a more cohesive, less coupled set of abstractions for data store access.Extras
clock_time
facilities toinfra
remote/kv
folder tokv
foldercomposite_storage_key
todb/util