Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.

state machine key value storage#4001

Closed
cheme wants to merge 96 commits intoparitytech:masterfrom
cheme:kv-state-machine
Closed

state machine key value storage#4001
cheme wants to merge 96 commits intoparitytech:masterfrom
cheme:kv-state-machine

Conversation

@cheme
Copy link
Contributor

@cheme cheme commented Nov 2, 2019

This PR extract the state machine logic from #3774 to try to make it more reviewable.
For general goal of key value storage, please refer to #3774.
This PR cover state machine and its new backend use to handle non state key values.
This is a very limited interface but a next step could be to extend api with the ability to chose a 'collection' (#3774 first target is purely technical : keyspace for child trie, but it could be extended, for instance we could push events targeting offchain).

complete some test method by providing child access to values.
is.
Need to use historied values, maybe remove pinned, and put some context
as parameter for get_offstate
probably need to store state, apply gc on state and depending on result
restore state or actually gc historied values.
for gc. Need to change commit set to contain an history of values and
adjust test db.
@cheme cheme added the A0-please_review Pull request needs code review. label Nov 2, 2019
}

/// Get backend storage reference.
pub fn backend_storage(&self) -> &S {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
pub fn backend_storage(&self) -> &S {
pub fn trie_backend_storage(&self) -> &S {

}

/// Consumes self and returns underlying storage.
pub fn into_storage(self) -> S {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
pub fn into_storage(self) -> S {
pub fn into_trie_storage(self) -> S {

@cheme
Copy link
Contributor Author

cheme commented Nov 11, 2019

Closing this PR because Child trie associated issue will be work around in a way that does not require this.
It make this a non prioritary thing.
Generally it adds complexity, and would require its own crate separation.
Some other part could maybe get merge.
Rethinking the design could also be interesting.

@cheme cheme closed this Nov 11, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

A0-please_review Pull request needs code review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants