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: enable p2p http txsync #5922

Merged
merged 6 commits into from
Jan 30, 2024

Conversation

algorandskiy
Copy link
Contributor

@algorandskiy algorandskiy commented Jan 26, 2024

Summary

  • Add multiaddr support to txsync
  • Replace GossipNode.GetRoundTripper with GossipNode.GetHTTPClient as higher level alternative. (only txsync used GetRoundTripper outside of the network package.

Test Plan

Added a new unit test to txSync to test p2p flow.

@algorandskiy algorandskiy added Enhancement p2p Work related to the p2p project labels Jan 26, 2024
@algorandskiy algorandskiy self-assigned this Jan 26, 2024
@algorandskiy algorandskiy force-pushed the pavel/p2p-http-txsync branch from b34e728 to 84f06d4 Compare January 29, 2024 17:17
Copy link

codecov bot commented Jan 29, 2024

Codecov Report

Attention: 42 lines in your changes are missing coverage. Please review.

Comparison is base (d69938a) 56.04% compared to head (7f37f93) 56.01%.

Files Patch % Lines
network/p2p/http.go 0.00% 15 Missing ⚠️
network/p2pNetwork.go 52.63% 8 Missing and 1 partial ⚠️
network/hybridNetwork.go 0.00% 5 Missing ⚠️
rpcs/httpTxSync.go 61.53% 3 Missing and 2 partials ⚠️
network/wsNetwork.go 60.00% 4 Missing ⚠️
network/p2p/streams.go 0.00% 3 Missing ⚠️
network/wsPeer.go 66.66% 1 Missing ⚠️
Additional details and impacted files
@@               Coverage Diff               @@
##           feature/p2p    #5922      +/-   ##
===============================================
- Coverage        56.04%   56.01%   -0.03%     
===============================================
  Files              482      482              
  Lines            68078    68099      +21     
===============================================
- Hits             38153    38146       -7     
- Misses           27327    27349      +22     
- Partials          2598     2604       +6     

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

@algorandskiy algorandskiy force-pushed the pavel/p2p-http-txsync branch from 84f06d4 to 22a0b29 Compare January 29, 2024 21:35
@algorandskiy algorandskiy changed the title WIP: p2p: enable p2p http txsync p2p: enable p2p http txsync Jan 29, 2024
@algorandskiy algorandskiy marked this pull request as ready for review January 29, 2024 21:36
@@ -167,7 +167,7 @@ type wsPeerCore struct {
readBuffer chan<- IncomingMessage
rootURL string
originAddress string // incoming connection remote host
client http.Client
client *http.Client
Copy link
Contributor Author

Choose a reason for hiding this comment

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

GetHTTPClient returns address of this variable, and it cannot be nil. But some client code checked it for nil

@algorandskiy algorandskiy merged commit 153f10d into algorand:feature/p2p Jan 30, 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.

1 participant