Skip to content
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

Separate IStore into IStateStore #950

Merged
merged 34 commits into from
Aug 14, 2020

Conversation

moreal
Copy link
Contributor

@moreal moreal commented Aug 10, 2020

This pull request separates IStore's functions to handle state into IStateStore.
Also, it's a step among steps to apply Merkle Patricia Trie (#939).

@moreal moreal self-assigned this Aug 10, 2020
@moreal moreal force-pushed the feature/separate-state-store branch from a86265e to 6b8c473 Compare August 10, 2020 07:51
@codecov
Copy link

codecov bot commented Aug 10, 2020

Codecov Report

Merging #950 into main will increase coverage by 0.06%.
The diff coverage is 89.40%.

@@            Coverage Diff             @@
##             main     #950      +/-   ##
==========================================
+ Coverage   88.13%   88.20%   +0.06%     
==========================================
  Files         276      280       +4     
  Lines       25270    25458     +188     
==========================================
+ Hits        22272    22455     +183     
- Misses       1537     1540       +3     
- Partials     1461     1463       +2     
Impacted Files Coverage Δ
Libplanet.Tests/Store/StoreTracker.cs 63.33% <ø> (+2.97%) ⬆️
...bplanet/Blockchain/FungibleAssetStateCompleters.cs 45.45% <0.00%> (ø)
Libplanet/Store/BaseStore.cs 77.50% <ø> (ø)
Libplanet/Net/Swarm.TrustedStateCompleter.cs 65.06% <50.00%> (-1.19%) ⬇️
Libplanet/Store/StoreExtensions.cs 44.28% <50.00%> (+0.42%) ⬆️
Libplanet.Tests/Store/StateStoreTracker.cs 60.00% <60.00%> (ø)
Libplanet/Net/Swarm.MessageHandlers.cs 85.27% <64.70%> (-0.44%) ⬇️
Libplanet/Net/Swarm.cs 86.09% <66.66%> (-0.17%) ⬇️
Libplanet/Store/BaseBlockStatesStore.cs 75.86% <75.86%> (ø)
Libplanet/Blockchain/BlockChain.cs 90.78% <86.20%> (-0.21%) ⬇️
... and 24 more

@moreal moreal added the storage Related to storage (Libplanet.Store) label Aug 10, 2020
Libplanet.RocksDBStore/RocksDBStore.cs Outdated Show resolved Hide resolved
Libplanet/Blockchain/BlockChain.cs Outdated Show resolved Hide resolved
@moreal moreal force-pushed the feature/separate-state-store branch from c79eeae to af1447b Compare August 11, 2020 04:26
@moreal moreal requested a review from longfin August 11, 2020 05:28
longfin
longfin previously approved these changes Aug 11, 2020
@moreal moreal mentioned this pull request Aug 11, 2020
6 tasks
Libplanet/Blockchain/BlockChain.cs Outdated Show resolved Hide resolved
Libplanet/Blockchain/BlockChain.cs Outdated Show resolved Hide resolved
riemannulus
riemannulus previously approved these changes Aug 12, 2020
@moreal moreal dismissed stale reviews from riemannulus and longfin via 48928d2 August 12, 2020 06:32
@moreal moreal requested a review from limebell August 12, 2020 06:40
Libplanet/Store/IStateStore.cs Outdated Show resolved Hide resolved
Libplanet/Blockchain/BlockChain.cs Outdated Show resolved Hide resolved
Libplanet/Blockchain/BlockChain.cs Outdated Show resolved Hide resolved
longfin
longfin previously approved these changes Aug 12, 2020
earlbread
earlbread previously approved these changes Aug 12, 2020
limebell
limebell previously approved these changes Aug 12, 2020
riemannulus
riemannulus previously approved these changes Aug 12, 2020
earlbread
earlbread previously approved these changes Aug 14, 2020
longfin
longfin previously approved these changes Aug 14, 2020
limebell
limebell previously approved these changes Aug 14, 2020
riemannulus
riemannulus previously approved these changes Aug 14, 2020
Libplanet/Store/IBlockStatesStore.cs Outdated Show resolved Hide resolved
Libplanet/Store/IStateStore.cs Outdated Show resolved Hide resolved
Libplanet/Store/IStateStore.cs Outdated Show resolved Hide resolved
Libplanet/Store/IStateStore.cs Outdated Show resolved Hide resolved
Libplanet/Store/IStateStore.cs Outdated Show resolved Hide resolved
Libplanet/Store/IStateStore.cs Outdated Show resolved Hide resolved
Libplanet/Store/IStateStore.cs Outdated Show resolved Hide resolved
Libplanet/Store/IStateStore.cs Outdated Show resolved Hide resolved
Libplanet/Store/IStateStore.cs Outdated Show resolved Hide resolved
public interface IStateStore
{
/// <summary>
/// Sets states mapped as relation <see cref="Block{T}.Hash"/> → states.
Copy link
Contributor

Choose a reason for hiding this comment

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

What does “mapped as relation …” mean?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sadly, I couldn't find well expression for it 😢. Actually I wanted to say like Stores the key-value pair with blockHash as key, states as value.

Co-authored-by: Hong Minhee (洪 民憙) <hong.minhee@gmail.com>
@moreal moreal force-pushed the feature/separate-state-store branch from 4bf7ab2 to 0f0aaa4 Compare August 14, 2020 09:13
@longfin longfin merged commit 1b29769 into planetarium:main Aug 14, 2020
@dahlia dahlia mentioned this pull request Sep 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
storage Related to storage (Libplanet.Store)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants