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

Preload blocks from multiple peers at a time #707

Merged
merged 14 commits into from
Feb 4, 2020

Conversation

dahlia
Copy link
Contributor

@dahlia dahlia commented Dec 4, 2019

This patch makes IDL parallel by requesting chunks of blocks to multiple peers. As complexity of IDL logic grows up, I added a separated class named BlockCompletion<T> which has only a pure logic of dealing with block demands and completion without actual I/Os, and made Swarm<T>.PreloadAsync() method to use it.

@dahlia dahlia force-pushed the block-completion branch 2 times, most recently from bd6ec9c to 6210fe2 Compare December 6, 2019 15:31
@dahlia dahlia marked this pull request as ready for review December 6, 2019 15:33
@dahlia dahlia self-assigned this Dec 6, 2019
@longfin
Copy link
Member

longfin commented Dec 9, 2019

It seems builds fail. 😢

Libplanet.Tests/Net/BlockCompletionTest.cs Outdated Show resolved Hide resolved
Libplanet/Net/Messages/Message.cs Outdated Show resolved Hide resolved
Libplanet/Net/Swarm.cs Outdated Show resolved Hide resolved
@stale
Copy link

stale bot commented Dec 26, 2019

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.

@stale stale bot added the stale The issue is stale label Dec 26, 2019
@dahlia dahlia removed the stale The issue is stale label Dec 26, 2019
@dahlia dahlia force-pushed the block-completion branch 5 times, most recently from 3fd4ded to 37cd5f1 Compare January 2, 2020 13:03
@codecov
Copy link

codecov bot commented Jan 2, 2020

Codecov Report

Merging #707 into master will increase coverage by 0.21%.
The diff coverage is 91.97%.

@@            Coverage Diff             @@
##           master     #707      +/-   ##
==========================================
+ Coverage   86.43%   86.65%   +0.21%     
==========================================
  Files         226      231       +5     
  Lines       19496    20444     +948     
==========================================
+ Hits        16852    17716     +864     
- Misses       1432     1502      +70     
- Partials     1212     1226      +14
Impacted Files Coverage Δ
Libplanet/Net/Messages/Message.cs 85.71% <ø> (ø) ⬆️
Libplanet.Tests/Blockchain/BlockChainTest.cs 98.74% <100%> (ø) ⬆️
Libplanet.Tests/Net/SwarmTest.cs 96.41% <100%> (-0.02%) ⬇️
Libplanet/Net/BlockDownloadState.cs 100% <100%> (ø) ⬆️
Libplanet.Tests/Blockchain/BlockLocatorTest.cs 100% <100%> (ø)
Libplanet/Net/StateDownloadState.cs 100% <100%> (ø) ⬆️
Libplanet/Net/BlockHashDownloadState.cs 100% <100%> (ø)
Libplanet/Blockchain/BlockChain.cs 90.3% <70.58%> (-0.35%) ⬇️
Libplanet/Net/BlockCompletion.cs 84.06% <84.06%> (ø)
Libplanet/Net/Swarm.cs 85.21% <90.86%> (+1.07%) ⬆️
... and 12 more

@dahlia dahlia force-pushed the block-completion branch 7 times, most recently from 0598b60 to bbff23c Compare January 7, 2020 13:05
@longfin longfin self-assigned this Jan 17, 2020
@dahlia dahlia dismissed stale reviews from limebell, moreal, and earlbread via b312195 February 4, 2020 07:55
@dahlia dahlia requested review from limebell, moreal and earlbread and removed request for longfin February 4, 2020 07:55
@dahlia
Copy link
Contributor Author

dahlia commented Feb 4, 2020

@planetarium/libplanet Rebased this on the current master. Please review this again! FYI only changelogs had been changed since then.

@dahlia dahlia merged commit 299f2fc into planetarium:master Feb 4, 2020
@limebell limebell mentioned this pull request Feb 4, 2020
2 tasks
limebell added a commit to limebell/libplanet that referenced this pull request Feb 11, 2020
limebell added a commit that referenced this pull request Feb 11, 2020
Revert "Preload blocks from multiple peers at a time" (#707)
dahlia added a commit to dahlia/libplanet that referenced this pull request Feb 11, 2020
dahlia added a commit to dahlia/libplanet that referenced this pull request Feb 14, 2020
libplanet pushed a commit to dahlia/libplanet that referenced this pull request Feb 22, 2020
dahlia added a commit to dahlia/libplanet that referenced this pull request Feb 24, 2020
dahlia added a commit that referenced this pull request Feb 24, 2020
Restore BlockCompletion<T> (#707) and more
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
network Related to networking (Libplanet.Net)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants