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

Properly scope state/state refs to download/reuse #385

Merged
merged 4 commits into from Aug 1, 2019

Conversation

@dahlia
Copy link
Member

commented Aug 1, 2019

There had been a corner case where a trusted peer sends inconsistent states and state refs, because the exact times to get both data from the store can subtly differ each other. In order to avoid that specific case, I added filtering options named onlyAfter/ignoreAfter to ListAllStateReferences() method, and made Swarm to query state refs with a strict scope so that state refs to send are consistent with states to send.

@dahlia dahlia added the bug label Aug 1, 2019

@dahlia dahlia added this to the 0.5.0 milestone Aug 1, 2019

@dahlia dahlia self-assigned this Aug 1, 2019

@codecov

This comment has been minimized.

Copy link

commented Aug 1, 2019

Codecov Report

Merging #385 into 9c-fft will decrease coverage by 0.13%.
The diff coverage is 88%.

@@            Coverage Diff             @@
##           9c-fft     #385      +/-   ##
==========================================
- Coverage   88.29%   88.16%   -0.14%     
==========================================
  Files         193      193              
  Lines       13678    13720      +42     
==========================================
+ Hits        12077    12096      +19     
- Misses       1324     1334      +10     
- Partials      277      290      +13
Impacted Files Coverage Δ
Libplanet.Tests/Store/StoreTracker.cs 49.21% <0%> (-1.59%) ⬇️
Libplanet/Store/StoreExtension.cs 95.55% <100%> (+3.55%) ⬆️
Libplanet.Tests/Store/StoreTest.cs 98.83% <100%> (+0.03%) ⬆️
Libplanet/Store/BaseStore.cs 100% <100%> (ø) ⬆️
Libplanet/Store/FileStore.cs 90.01% <100%> (-0.39%) ⬇️
Libplanet/Store/LiteDBStore.cs 91.38% <100%> (-1.9%) ⬇️
Libplanet.Tests/Store/StoreExtensionTest.cs 100% <100%> (ø) ⬆️
Libplanet/Net/Messages/GetRecentStates.cs 56.52% <37.5%> (-43.48%) ⬇️
Libplanet/Net/Swarm.cs 79.07% <90.9%> (-0.06%) ⬇️
... and 2 more

@dahlia dahlia force-pushed the dahlia:download-properly-scoped-states branch from 22b5591 to 83c23e3 Aug 1, 2019

@dahlia dahlia changed the title WIP: Properly scope state/state refs to download/reuse Properly scope state/state refs to download/reuse Aug 1, 2019

@dahlia dahlia requested review from longfin and earlbread Aug 1, 2019

@dahlia dahlia marked this pull request as ready for review Aug 1, 2019

@longfin
longfin approved these changes Aug 1, 2019

@dahlia dahlia merged commit b320c48 into planetarium:9c-fft Aug 1, 2019

15 of 16 checks passed

codecov/patch 88% of diff hit (target 88.29%)
Details
WIP Ready for review
Details
changelog This contains self-describing changelog.
Details
codecov/project 88.16% (-0.14%) compared to 87fcbe6
Details
docs Libplanet docs generated by DocFX
Details
license/cla Contributor License Agreement is signed.
Details
planetarium.libplanet Build #20190801.11 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) Windows_NETCore 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
@dahlia dahlia referenced this pull request Aug 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.