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

Allow BlockChain<T> to have incomplete states #285

Merged
merged 9 commits into from Jun 19, 2019

Conversation

Projects
None yet
3 participants
@dahlia
Copy link
Member

commented Jun 14, 2019

This patch makes BlockChain<T> to have incomplete states so that we can implement #272 on this. Where a BlockChain<T> does not have complete states and a query to states that it lacks is required, there are two options:

  • Throwing IncompleteBlockStatesException (which is default).
  • Evaluating actions preceding the requested states and filling the states on the fly (completeStates: true).

See also CHANGES.md as well.

@dahlia dahlia requested review from longfin and earlbread Jun 14, 2019

@dahlia dahlia self-assigned this Jun 14, 2019

@dahlia dahlia added this to the 0.4.0 milestone Jun 14, 2019

@codecov

This comment has been minimized.

Copy link

commented Jun 14, 2019

Codecov Report

Merging #285 into master will increase coverage by 0.07%.
The diff coverage is 90.27%.

@@            Coverage Diff             @@
##           master     #285      +/-   ##
==========================================
+ Coverage   87.31%   87.38%   +0.07%     
==========================================
  Files         185      186       +1     
  Lines       12204    12449     +245     
==========================================
+ Hits        10656    10879     +223     
- Misses       1307     1323      +16     
- Partials      241      247       +6
Impacted Files Coverage Δ
Libplanet/Tx/InvalidTxUpdatedAddressesException.cs 84.61% <ø> (ø) ⬆️
Libplanet/Store/BaseStore.cs 100% <ø> (ø) ⬆️
Libplanet.Tests/Store/StoreTracker.cs 52.06% <0%> (+1.63%) ⬆️
Libplanet.Tests/Store/StoreTest.cs 98.65% <100%> (+0.13%) ⬆️
Libplanet/Address.cs 91.76% <100%> (+0.09%) ⬆️
...lanet/Blockchain/IncompleteBlockStatesException.cs 37.5% <37.5%> (ø)
Libplanet/Store/LiteDBStore.cs 92.25% <69.56%> (-1.24%) ⬇️
Libplanet/Store/FileStore.cs 93.21% <86.36%> (-0.26%) ⬇️
Libplanet/Blockchain/BlockChain.cs 96.53% <95%> (-0.21%) ⬇️
Libplanet.Tests/Blockchain/BlockChainTest.cs 98.62% <96.77%> (-0.34%) ⬇️
... and 3 more
@longfin
Copy link
Member

left a comment

Show resolved Hide resolved CHANGES.md Outdated
Show resolved Hide resolved Libplanet.Tests/Blockchain/BlockChainTest.cs Outdated
Show resolved Hide resolved Libplanet/Blockchain/BlockChain.cs Outdated
Show resolved Hide resolved Libplanet/Blockchain/BlockChain.cs
Show resolved Hide resolved Libplanet/Blockchain/BlockChain.cs Outdated
Show resolved Hide resolved Libplanet/Blockchain/BlockChain.cs Outdated
Show resolved Hide resolved Libplanet/Blockchain/BlockChain.cs Outdated

@dahlia dahlia force-pushed the dahlia:states-lazy-evaluation branch from d690724 to d5fa6f0 Jun 17, 2019

@dahlia dahlia requested a review from earlbread Jun 17, 2019

@longfin
Copy link
Member

left a comment

It seems to conflict.

@dahlia dahlia force-pushed the dahlia:states-lazy-evaluation branch from bd06c97 to 8708fd1 Jun 19, 2019

@dahlia dahlia requested a review from longfin Jun 19, 2019

@dahlia

This comment has been minimized.

Copy link
Member Author

commented Jun 19, 2019

@longfin @earlbread Rebased this on the current master and addressed reviewed points. Please review this again.

@dahlia dahlia requested a review from earlbread Jun 19, 2019

@dahlia dahlia force-pushed the dahlia:states-lazy-evaluation branch from dd49ffb to 25156bb Jun 19, 2019

@dahlia dahlia requested a review from earlbread Jun 19, 2019

@dahlia

This comment has been minimized.

Copy link
Member Author

commented Jun 19, 2019

@earlbread @longfin Rebased again. Please review this again.

@dahlia dahlia merged commit 985709e into planetarium:master Jun 19, 2019

15 of 16 checks passed

planetarium.libplanet (Windows_NETCore)
Details
Travis CI - Pull Request Build Passed
Details
WIP Ready for review
Details
changelog This contains self-describing changelog.
Details
codecov/patch 90.27% of diff hit (target 87.31%)
Details
codecov/project 87.38% (+0.07%) compared to aa37909
Details
docs Libplanet docs generated by DocFX
Details
planetarium.libplanet Build #20190619.12 succeeded
Details
planetarium.libplanet (Linux_Mono) Linux_Mono succeeded
Details
planetarium.libplanet (Linux_NETCore) Linux_NETCore succeeded
Details
planetarium.libplanet (Windows_Mono) Windows_Mono succeeded
Details
planetarium.libplanet (Windows_NETCore_coverage) Windows_NETCore_coverage succeeded
Details
planetarium.libplanet (Windows_NETFramework) Windows_NETFramework succeeded
Details
planetarium.libplanet (macOS_Mono) macOS_Mono succeeded
Details
planetarium.libplanet (macOS_NETCore) macOS_NETCore succeeded
Details
planetarium.libplanet (macOS_Unity) macOS_Unity succeeded
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.