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
Contributor

@dahlia dahlia 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 Something isn't working 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
Copy link

codecov bot 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 download-properly-scoped-states branch from 22b5591 to 83c23e3 Compare August 1, 2019 14:16
@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 marked this pull request as ready for review August 1, 2019 14:20
@dahlia dahlia merged commit b320c48 into planetarium:9c-fft Aug 1, 2019
@dahlia dahlia mentioned this pull request Aug 6, 2019
limebell pushed a commit to limebell/libplanet that referenced this pull request Jul 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants