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

Network polishing #215

Merged
merged 4 commits into from Apr 24, 2019

Conversation

Projects
None yet
2 participants
@longfin
Copy link
Member

commented Apr 24, 2019

This PR fixes two problems.

  1. Current TURN client and relay implementations are vulnerable to packet corruption because they do not retry if parsing fails. To fix this, I modified to ignore exceptions and retry.
  2. When forking to apply a chain from another node, use BlockChain<T>.Fork() to rewind the current chain to the branch point. I improved performance by eliminating unnecessary validation at this time.

@longfin longfin requested review from dahlia and earlbread Apr 24, 2019

@codecov

This comment has been minimized.

Copy link

commented Apr 24, 2019

Codecov Report

Merging #215 into master will decrease coverage by 3.6%.
The diff coverage is 0%.

@@            Coverage Diff             @@
##           master     #215      +/-   ##
==========================================
- Coverage   87.45%   83.85%   -3.61%     
==========================================
  Files          74       74              
  Lines        3364     3369       +5     
==========================================
- Hits         2942     2825     -117     
- Misses        422      544     +122
Impacted Files Coverage Δ
Libplanet/Blockchain/BlockChain.cs 97.73% <ø> (-1.52%) ⬇️
Libplanet/Net/Swarm.cs 80.91% <0%> (-6.95%) ⬇️
Libplanet/Net/IceServer.cs 0% <0%> (-100%) ⬇️
Libplanet/Net/IceServerException.cs 0% <0%> (-100%) ⬇️
Libplanet/Net/NetworkStreamProxy.cs 0% <0%> (-77.78%) ⬇️
Show resolved Hide resolved CHANGES.md Outdated
Show resolved Hide resolved CHANGES.md Outdated
Show resolved Hide resolved Libplanet/Net/Swarm.cs
@dahlia

This comment has been minimized.

Copy link
Member

commented Apr 24, 2019

Need a link reference destination too.

[#215]: https://github.com/planetarium/libplanet/pull/215

longfin and others added some commits Apr 24, 2019

Update CHANGES.md
Co-Authored-By: longfin <longfinfunnel@gmail.com>

@longfin longfin force-pushed the longfin:feature/p2p-polish branch from 18c8f47 to 39e431a Apr 24, 2019

@longfin longfin requested a review from dahlia Apr 24, 2019

@dahlia

dahlia approved these changes Apr 24, 2019

@longfin longfin merged commit 966cf17 into planetarium:master Apr 24, 2019

3 of 5 checks passed

codecov/patch 0% of diff hit (target 87.45%)
Details
codecov/project 83.85% (-3.61%) compared to fed5858
Details
Travis CI - Pull Request Build Passed
Details
WIP Ready for review
Details
changelog This contains self-describing changelog.
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.