-
Notifications
You must be signed in to change notification settings - Fork 152
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
Find blocks in store instead of in chain #1324
Find blocks in store instead of in chain #1324
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add a minimum test case to reproduce the problem this PR tries to address? Would it be difficult to reproduce in deterministic manner?
it would be better if we have changelog about this patch. (as behaviour change?) |
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This pull request has been automatically closed because it has not had recent activity. Thank you for your contributions. |
1073ca5
to
730d7d8
Compare
Codecov Report
@@ Coverage Diff @@
## 0.12-maintenance #1324 +/- ##
====================================================
- Coverage 77.34% 77.09% -0.25%
====================================================
Files 256 254 -2
Lines 17229 17145 -84
====================================================
- Hits 13325 13218 -107
- Misses 3353 3371 +18
- Partials 551 556 +5
|
730d7d8
to
baa6e85
Compare
PTAL @libplanet |
LGTM.
|
Looking up in the blockchain looks up storage too. |
IMO, what I mentioned(in blockchain but not in store) is not covered by BlockChain.ContainsBlock Btw, BlockChain.ContainsBlock already searching db too, hence there is no further problem with performance by this change. |
I thought the main issue was unnecessarily redownloading a block where given block is not in blockchain but in store? Improving storage access performance is a separate issue. |
/rebase |
32d44cd
baa6e85
to
32d44cd
Compare
/rebase |
32d44cd
to
8a93fb2
Compare
/rebase |
8a93fb2
to
13b05f4
Compare
13b05f4
to
b590f34
Compare
Retargeted to the 0.12-maintenance branch and rebased on that. |
This PR changes the
BlockCompletion
predicate to use theContainsBlock
method ofIStore
instead ofBlockChain
. This way,Swarm
won't have to download blocks again if preloading is aborted during theBlock Execution
stage.