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

feat(core-p2p): don't trust headers and verify config and plugin connectivity of peers #2559

Merged
merged 20 commits into from May 16, 2019

Conversation

Projects
None yet
4 participants
@faustbrian
Copy link
Collaborator

commented May 9, 2019

Summary

  • Remove all peer headers, instead request and verify certain values we need to know about.
  • Request peer configuration and verify that they have certain plugins enabled

What kind of change does this PR introduce?

  • Bugfix
  • New feature
  • Refactoring / Performance Improvements
  • Build-related changes
  • Documentation
  • Tests / Continuous Integration
  • Other, please describe:

Does this PR introduce a breaking change?

  • Yes
  • No

Does this PR release a new version?

  • Yes
    • All tests are passing
    • All benchmarks are passing without any major regressions
    • Sync from 0 works on mainnet
    • Sync from 0 works on devnet
    • Starting a new network and forging on it work
    • Explorer is fully functional
    • Wallets are fully functional
  • No

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

commented May 9, 2019

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

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

@faustbrian faustbrian changed the title feat(core-p2p): verify configuration and plugin connectivity of peers feat(core-p2p): don't trust headers and verify config and plugin connectivity of peers May 9, 2019

@codecov-io

This comment has been minimized.

Copy link

commented May 15, 2019

Codecov Report

Merging #2559 into develop will decrease coverage by 0.19%.
The diff coverage is 71.42%.

Impacted file tree graph

@@            Coverage Diff             @@
##           develop    #2559     +/-   ##
==========================================
- Coverage    66.82%   66.62%   -0.2%     
==========================================
  Files          406      407      +1     
  Lines         8883     8881      -2     
  Branches       419      415      -4     
==========================================
- Hits          5936     5917     -19     
- Misses        2894     2912     +18     
+ Partials        53       52      -1
Impacted Files Coverage Δ
packages/core-p2p/src/socket-server/worker.ts 28.81% <ø> (-0.22%) ⬇️
packages/core-transaction-pool/src/connection.ts 95.59% <ø> (ø) ⬆️
...kages/core-api/src/versions/2/peers/transformer.ts 66.66% <ø> (ø) ⬆️
...ckages/core-api/src/versions/1/peers/controller.ts 66.66% <ø> (-2.3%) ⬇️
packages/core-p2p/src/peer-storage.ts 100% <ø> (ø) ⬆️
...kages/core-api/src/versions/1/peers/transformer.ts 100% <ø> (ø) ⬆️
packages/core-forger/src/client.ts 62.79% <ø> (-1.66%) ⬇️
packages/core-p2p/src/schemas.ts 75% <ø> (ø) ⬆️
packages/core-p2p/src/network-monitor.ts 64.67% <0%> (ø) ⬆️
packages/core/src/commands/config/database.ts 0% <0%> (ø) ⬆️
... and 18 more

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 e6c8406...59f0e6f. Read the comment docs.

supaiku0 added some commits May 15, 2019

@supaiku0 supaiku0 marked this pull request as ready for review May 16, 2019

@supaiku0 supaiku0 requested review from air1one, kristjank and supaiku0 as code owners May 16, 2019

@faustbrian faustbrian merged commit fd18f7c into develop May 16, 2019

12 checks passed

ci/circleci: test-node10-benchmark Your tests passed on CircleCI!
Details
ci/circleci: test-node10-e2e Your tests passed on CircleCI!
Details
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-unit Your tests passed on CircleCI!
Details
ci/circleci: test-node11-benchmark Your tests passed on CircleCI!
Details
ci/circleci: test-node11-e2e 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-unit Your tests passed on CircleCI!
Details

@ArkEcosystemBot ArkEcosystemBot deleted the refactor/peer-headers branch May 16, 2019

vasild added a commit that referenced this pull request May 22, 2019

Merge remote-tracking branch 'ArkEcosystem/core/2.6' into nonces-remo…
…ve-incdec

* ArkEcosystem/core/2.6:
  feat: initial nonce implementation (#2573)
  Merge develop into 2.5 (#2600)
  refactor(core-json-rpc): use blockId schema for validation (#2596)
  chore(core-database-postgres): add core-state dependency (#2598)
  fix(core-database-postgres): use day instead of date (#2595)
  refactor: use dayjs as it now has official UTC support (#2592)
  refactor(core-json-rpc): improved version of #2593
  release: 2.3.23 (#2594)
  fix(core-json-rpc): allow use of old and new block IDs (#2593)
  fix(core-p2p): do not suspend peer for `AppNotReady` (#2590)
  chore(changelog): add latest changes for 2.4.0 (#2591)
  chore(ci): setup node.js 12 on CircleCI (#2474)
  fix(core-blockchain): divide blocks into smaller chunks for batch processing (#2586)
  refactor(crypto): fallback to ECDSA signature for version 2 transactions (#2584)
  fix(core-p2p): don't cause suspensions for unresponsive plugins (#2583)
  fix(core-p2p): don't cause suspensions for unresponsive plugins
  test(core-api): set p2p port on dummy peer
  feat(core): command to generate network configuration (#2582)
  fix(core-blockchain): delete bad rounds after unclean shutdown (#2581)
  feat(core-p2p): don't trust headers and verify config and plugin connectivity of peers (#2559)
  refactor: use ApplicationEvents enum instead of string (#2580)
  refactor(core-api): enforce "application/json" as content-type
  refactor(core-api): use pagination configuration limit
  test(e2e): remove version assertions
  chore(ci): update CircleCI configuration
  test(core-tester-cli): update API mock URLs
  refactor(core-api): register /api/v2 as a transition period fallback (#2578)
  test(core-api): use address identity
  refactor(corer-api): remove the legacy API (#2439)
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.