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

p2p: test scenarios support #5962

Merged
merged 48 commits into from
Jun 12, 2024

Conversation

algorandskiy
Copy link
Contributor

@algorandskiy algorandskiy commented Mar 18, 2024

Summary

  • add P2PBootstrap netdeploy's template option
  • add p2p dnsadddr support to netdeploy
  • fix DNSSecurityTXTEnforced use for DNS TXT queries instead of DNSSecuritySRVEnforced
  • add scenario1s-p2p, hello-word-tiny-p2p, hello-world-small-p2p
  • fix libp2p and DHT metrics exporters
  • add missing gossipSubPeer.RoutingAddr implementation needed for TX handler when throttled with ERL
  • add exponential backoff to p2p meshThread
  • fix outgoing connection counting, and use conn direction rather than stream direction for incoming/outgoing peer tagging
  • make libp2 logger to log into node.log by implementing zapcore.Core writing via logger.Logger
    Example log records
{
    "file": "github.com/libp2p/[email protected]/config/config.go",
    "function": "github.com/libp2p/go-libp2p/config.(*Config).NewNode",
    "level": "warning",
    "line": 304,
    "msg": "rcmgr limit conflicts with connmgr limit: conn manager high watermark limit: 192, exceeds the system connection limit of: 1",
    "name": "127.0.0.1:0",
    "libp2p": "p2p-config",
    "time": "2024-04-17T19:43:31.640497-04:00"
}
{
    "file": "github.com/libp2p/[email protected]/pubsub.go",
    "function": "github.com/libp2p/go-libp2p-pubsub.(*PubSub).processLoop",
    "level": "info",
    "line": 671,
    "msg": "pubsub processloop shutting down",
    "name": "127.0.0.1:0",
    "libp2p": "pubsub",
    "time": "2024-04-17T19:43:36.354601-04:00"
}

Test Plan

  • Ran scenarios, ensured progress
  • Deployed networks, collected/analyzed regular performance metrics - 4-6k TPS on scenario1s-p2p
p2p net scenario TPS MEM
without pubsub image image
with pubsub (default) image image

@algorandskiy algorandskiy added Enhancement p2p Work related to the p2p project labels Mar 18, 2024
@algorandskiy algorandskiy self-assigned this Mar 18, 2024
Copy link

codecov bot commented Mar 18, 2024

Codecov Report

Attention: Patch coverage is 53.52113% with 66 lines in your changes are missing coverage. Please review.

Project coverage is 56.02%. Comparing base (411837f) to head (f1f03a7).

Files Patch % Lines
network/p2p/logger.go 0.00% 41 Missing ⚠️
network/p2p/mux.go 78.12% 11 Missing and 3 partials ⚠️
network/p2pNetwork.go 69.56% 7 Missing ⚠️
logging/log.go 0.00% 2 Missing ⚠️
network/p2p/http.go 0.00% 1 Missing ⚠️
network/p2p/streams.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@              Coverage Diff              @@
##           feature/p2p    #5962    +/-   ##
=============================================
  Coverage        56.01%   56.02%            
=============================================
  Files              495      497     +2     
  Lines            69009    69130   +121     
=============================================
+ Hits             38657    38731    +74     
- Misses           27730    27774    +44     
- Partials          2622     2625     +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@algorandskiy algorandskiy force-pushed the pavel/p2p-scenarios branch 4 times, most recently from 69cb867 to a5ccfcb Compare April 2, 2024 20:15
@algorandskiy algorandskiy requested a review from cce April 17, 2024 23:29
@algorandskiy algorandskiy force-pushed the pavel/p2p-scenarios branch 2 times, most recently from 3a7e767 to 79251d0 Compare April 19, 2024 21:31
@algorandskiy algorandskiy changed the title WIP: p2p: test scenarios support p2p: test scenarios support Apr 20, 2024
@algorandskiy algorandskiy marked this pull request as ready for review April 20, 2024 00:12
@algorandskiy algorandskiy force-pushed the pavel/p2p-scenarios branch from 09a16c1 to d2d2e3a Compare May 10, 2024 20:30
@@ -0,0 +1,66 @@
"""
Copy link
Contributor Author

Choose a reason for hiding this comment

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

the idea is to have it dependency-free so it can be run on a remote machine with logs

@algorandskiy algorandskiy force-pushed the pavel/p2p-scenarios branch 2 times, most recently from 92b7d16 to 9c63601 Compare May 15, 2024 19:30
@codecov-commenter
Copy link

codecov-commenter commented May 23, 2024

Codecov Report

Attention: Patch coverage is 31.73077% with 71 lines in your changes missing coverage. Please review.

Project coverage is 56.12%. Comparing base (8f9ad90) to head (e59fd47).

Files Patch % Lines
network/p2p/logger.go 0.00% 41 Missing ⚠️
network/p2pNetwork.go 63.15% 10 Missing and 4 partials ⚠️
network/p2p/p2p.go 0.00% 6 Missing ⚠️
network/p2p/streams.go 0.00% 4 Missing ⚠️
config/localTemplate.go 0.00% 3 Missing ⚠️
logging/log.go 0.00% 2 Missing ⚠️
network/p2p/http.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@               Coverage Diff               @@
##           feature/p2p    #5962      +/-   ##
===============================================
- Coverage        56.13%   56.12%   -0.02%     
===============================================
  Files              487      488       +1     
  Lines            69327    69396      +69     
===============================================
+ Hits             38919    38946      +27     
- Misses           27760    27800      +40     
- Partials          2648     2650       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@algorandskiy algorandskiy force-pushed the pavel/p2p-scenarios branch from e105157 to cb06762 Compare June 7, 2024 19:44
@algorandskiy algorandskiy requested a review from gmalouf June 11, 2024 18:26
loggingFields[f.Key] = f.Interface
} else {
loggingFields[f.Key] = f.Integer
}
Copy link
Contributor

Choose a reason for hiding this comment

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

I guess it is OK to ignore the field type because they all boil down to one of these three types?

n.log.With("event", event).With("remote", addr).With("local", localAddr).Infof(msg, p2ppeer.String())
localAddr, has := n.Address()
if !has {
n.log.Warn("Could not get local address")
Copy link
Contributor

Choose a reason for hiding this comment

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

How often does this happen?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

not sure but it did happen few times - discovered when parsed node.log files for topology images.

@algorandskiy algorandskiy merged commit 052792d into algorand:feature/p2p Jun 12, 2024
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement p2p Work related to the p2p project
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants