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

Conversation

@cheme
Copy link
Contributor

@cheme cheme commented Nov 2, 2019

This PR extract the state-db 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-db additions.

As an extract from #3774, some TODO are present on state machine and client interfaces and tests are lacking.

  • dedicated journal (KvJournalRecord) are added (this could be merge in existing journal but focus here on non breaking change) to store block change, and pruning.
  • fork are handled with a sequential 'branch id' used as a per value index for memory historic of data (see historical-data tree).
    The branch id are not persisted since this is state db.
  • pruning which is more a client problematic is handled in this pr in the state machine test over a test backend.
  • apply commit operation got new variants, because some key value content do not make sense.

Note that some pruning enhancement described in #3774 could be added.

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
@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.

1 participant