Skip to content

p2p: enable p2p http txsync#5922

Merged
algorandskiy merged 6 commits intoalgorand:feature/p2pfrom
algorandskiy:pavel/p2p-http-txsync
Jan 30, 2024
Merged

p2p: enable p2p http txsync#5922
algorandskiy merged 6 commits intoalgorand:feature/p2pfrom
algorandskiy:pavel/p2p-http-txsync

Conversation

@algorandskiy
Copy link
Copy Markdown
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
@codecov
Copy link
Copy Markdown

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
Comment thread network/wsPeer.go
rootURL string
originAddress string // incoming connection remote host
client http.Client
client *http.Client
Copy link
Copy Markdown
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
@algorandskiy algorandskiy deleted the pavel/p2p-http-txsync branch March 16, 2026 20:06
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