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/multiple p2p messengers #5345

Merged
merged 64 commits into from
Jul 21, 2023
Merged

Conversation

sstanculeanu
Copy link
Collaborator

@sstanculeanu sstanculeanu commented Jun 14, 2023

Reasoning behind the pull request

  • new network needed to simplify the synchronization process for full archive nodes

Proposed changes

This feature is a complete refactoring for the full archive solution. The old solution was based on the idea that full archive nodes would still connect on the p2p network by overriding the sharding counters but in practice, it did not perform well. This new solution relies on a secondary, optional p2p network on which only the full archive nodes will join.
Since this network will mostly contain full archive nodes, the connection between the nodes and the cycles
request-response will be optimized.

Testing procedure

  • standard system test + specific full archive tests described below
    • start a new seeder with a new protocolID(seednode/config/p2p.toml) for the new network(eg. erd/kad/1.0.1)
    • start some nodes as full archive nodes, having the above protocolID on node/config/fullArchiveP2P.toml + add this seeder to InitialPeerList
    • after 20-30 epochs, start a new node in full archive mode, with the above changes as well. This node should easily sync

Pre-requisites

Based on the Contributing Guidelines the PR author and the reviewers must check the following requirements are met:

  • was the PR targeted to the correct branch?
  • if this is a larger feature that probably needs more than one PR, is there a feat branch created?
  • if this is a feat branch merging, do all satellite projects have a proper tag inside go.mod?

sstanculeanu and others added 14 commits June 7, 2023 19:47
…ents to create and manage both messengers

added new fullArchiveP2P.toml file(for the moment just a copy of p2p.toml) + new flags
removed MetricP2PFullHistoryObservers which won't be needed anymore
removed FullHistoryList from diffPeerListCreator as it won't be needed anymore
added the needed disabled components
added todos for further implementation
Manage multiple network messengers on network components
small refactor on antiflood components creation
created a new full history peer shard mapper
create new interceptors for heartbeat to feed the new peer shard mapper
Full archive heartbeat sender + new data pools
@codecov
Copy link

codecov bot commented Jun 27, 2023

Codecov Report

Patch coverage: 89.41% and project coverage change: +0.08 🎉

Comparison is base (d3689a5) 80.00% compared to head (9f2f226) 80.09%.

❗ Current head 9f2f226 differs from pull request most recent head 33486c2. Consider uploading reports for the commit 33486c2 to get more accurate results

Additional details and impacted files
@@              Coverage Diff              @@
##           rc/v1.6.0    #5345      +/-   ##
=============================================
+ Coverage      80.00%   80.09%   +0.08%     
=============================================
  Files            704      704              
  Lines          92814    93153     +339     
=============================================
+ Hits           74260    74613     +353     
+ Misses         13240    13228      -12     
+ Partials        5314     5312       -2     
Impacted Files Coverage Δ
dataRetriever/topicSender/diffPeerListCreator.go 100.00% <ø> (ø)
epochStart/bootstrap/fromLocalStorage.go 49.43% <0.00%> (-1.15%) ⬇️
node/metrics/metrics.go 100.00% <ø> (ø)
node/node.go 78.41% <0.00%> (ø)
...tiflood/factory/p2pAntifloodAndBlacklistFactory.go 73.98% <0.00%> (-3.12%) ⬇️
api/groups/nodeGroup.go 96.74% <9.09%> (-3.26%) ⬇️
node/nodeHelper.go 71.11% <59.37%> (-6.84%) ⬇️
factory/network/networkComponentsHandler.go 72.64% <62.50%> (+1.77%) ⬆️
factory/processing/processComponentsHandler.go 81.00% <63.63%> (-0.30%) ⬇️
epochStart/bootstrap/process.go 84.27% <85.24%> (-0.42%) ⬇️
... and 45 more

... and 1 file with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

sstanculeanu and others added 15 commits July 7, 2023 14:43
…into merge_rc160_into_feat_multiple_p2p_messengers_2023.07.07

# Conflicts:
#	errors/errors.go
#	factory/mock/processComponentsStub.go
#	factory/processing/processComponents.go
#	go.mod
#	integrationTests/mock/processComponentsStub.go
…le_p2p_messengers_2023.07.07

Merge rc160 into feat multiple p2p messengers 2023.07.07
…into feat/multiple_p2p_messengers

# Conflicts:
#	process/transaction/shardProcess_test.go
…le_p2p_messengers_2023.07.10

Merge rc160 into feat multiple p2p messengers 2023.07.10
Updated mx-chain-communication-go with NetworkType
…into merge_rc160_into_feat_multiple_p2p_messengers

# Conflicts:
#	api/groups/nodeGroup.go
#	go.mod
…le_p2p_messengers

Merge rc160 into feat multiple p2p messengers
gabi-vuls
gabi-vuls previously approved these changes Jul 21, 2023
Copy link
Contributor

@gabi-vuls gabi-vuls left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ Log scanner @@

feat/multiple_p2p_messengers

================================================================================

  • Known Warnings 14
  • New Warnings 4
  • Known Errors 0
  • New Errors 0
  • Panics 0
    ================================================================================
  • block hash does not match 8598
  • wrong nonce in block 3836
  • miniblocks does not match 0
  • num miniblocks does not match 0
  • miniblock hash does not match 0
  • block bodies does not match 0
  • receipts hash missmatch 0
    ================================================================================
  • No jailed nodes on the testnet
    ================================================================================

ssd04
ssd04 previously approved these changes Jul 21, 2023
bogdan-rosianu
bogdan-rosianu previously approved these changes Jul 21, 2023
sstanculeanu and others added 2 commits July 21, 2023 10:35
@sstanculeanu sstanculeanu dismissed stale reviews from bogdan-rosianu, ssd04, and gabi-vuls via 33486c2 July 21, 2023 07:45
@sstanculeanu sstanculeanu merged commit c24eeef into rc/v1.6.0 Jul 21, 2023
@sstanculeanu sstanculeanu deleted the feat/multiple_p2p_messengers branch July 21, 2023 08:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants