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

fix(core-p2p): remove ping timeout ban #2366

Merged
merged 3 commits into from Apr 4, 2019

Conversation

Projects
None yet
4 participants
@supaiku0
Copy link
Contributor

supaiku0 commented Apr 4, 2019

Proposed changes

Nodes behind a firewall do not respond to pings and are getting banned for not replying. This prevents nodes that are talking in one direction only from making POST requests. A ban only happens for timeouts when requesting /peer/status. This PR removes the ban for a timeout, which aligns the behavior with the requests to other endpoints. acceptNewPeer no longer bans peers for the wrong reason.

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Refactoring (improve a current implementation without adding a new feature or fixing a bug)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Build (changes that affect the build system)
  • Docs (documentation only changes)
  • Test (adding missing tests or fixing existing tests)
  • Other... Please describe:

Checklist

  • I have read the CONTRIBUTING documentation
  • Lint and unit tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)
@ArkEcosystemBot

This comment has been minimized.

Copy link
Member

ArkEcosystemBot commented Apr 4, 2019

The ci/circleci: test-node11-unit job is failing as of ef294d1ba10d0e7ccee7b81982b3f1b1dc880a6c. Please review the logs for more information.

Once you've pushed the fixes, the build will automatically re-run. Thanks!

@ArkEcosystemBot

This comment has been minimized.

Copy link
Member

ArkEcosystemBot commented Apr 4, 2019

The ci/circleci: test-node10-integration-0 job is failing as of ef294d1ba10d0e7ccee7b81982b3f1b1dc880a6c. Please review the logs for more information.

Once you've pushed the fixes, the build will automatically re-run. Thanks!

@codecov-io

This comment has been minimized.

Copy link

codecov-io commented Apr 4, 2019

Codecov Report

Merging #2366 into develop will increase coverage by 0.08%.
The diff coverage is 65%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #2366      +/-   ##
===========================================
+ Coverage    65.99%   66.07%   +0.08%     
===========================================
  Files          400      400              
  Lines         8519     8520       +1     
  Branches       417      378      -39     
===========================================
+ Hits          5622     5630       +8     
+ Misses        2853     2846       -7     
  Partials        44       44
Impacted Files Coverage Δ
packages/core-p2p/src/court/offences.ts 100% <ø> (ø) ⬆️
...ages/core-p2p/src/server/plugins/accept-request.ts 0% <0%> (ø) ⬆️
packages/core-p2p/src/errors.ts 90.9% <100%> (+54.54%) ⬆️
packages/core-p2p/src/peer.ts 83.33% <100%> (+1.75%) ⬆️
packages/core-p2p/src/monitor.ts 38.91% <71.42%> (+0.25%) ⬆️
packages/core-p2p/src/court/guard.ts 73.41% <0%> (-1.27%) ⬇️
packages/core-logger-winston/src/formatter.ts 42.85% <0%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 39da913...7c8e14f. Read the comment docs.

@faustbrian faustbrian merged commit 19619f0 into ArkEcosystem:develop Apr 4, 2019

10 checks passed

ci/circleci: test-node10-functional Your tests passed on CircleCI!
Details
ci/circleci: test-node10-integration-0 Your tests passed on CircleCI!
Details
ci/circleci: test-node10-integration-1 Your tests passed on CircleCI!
Details
ci/circleci: test-node10-integration-2 Your tests passed on CircleCI!
Details
ci/circleci: test-node10-unit Your tests passed on CircleCI!
Details
ci/circleci: test-node11-functional Your tests passed on CircleCI!
Details
ci/circleci: test-node11-integration-0 Your tests passed on CircleCI!
Details
ci/circleci: test-node11-integration-1 Your tests passed on CircleCI!
Details
ci/circleci: test-node11-integration-2 Your tests passed on CircleCI!
Details
ci/circleci: test-node11-unit Your tests passed on CircleCI!
Details

@faustbrian faustbrian referenced this pull request Apr 5, 2019

Merged

refactor(core-p2p): separate responsibilities of classes #2364

19 of 19 tasks complete
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.