Send live network messages over TCP#1962
Merged
SergiySW merged 79 commits intonanocurrency:masterfrom May 22, 2019
Merged
Conversation
…id address-reuse issue
clemahieu
requested changes
May 9, 2019
nano/node/transport/udp.cpp
Outdated
| return result; | ||
| } | ||
|
|
||
| nano::endpoint nano::transport::udp_channels::find_node_id (nano::account const & node_id_a) |
Contributor
There was a problem hiding this comment.
I think this should return the channel instead of the endpoint, the caller can always query for the endpoint if that's what they want.
nano/node/transport/udp.cpp
Outdated
| // clang-format on | ||
|
|
||
| // Close all TCP sockets | ||
| for (auto i (channels.begin ()), j (channels.end ()); i != j; ++i) |
Contributor
There was a problem hiding this comment.
This is more tcp-induced cleanup complexity. This should be inside a tcp_channels class that's dedicated to managing tcp-related things.
nano/node/transport/udp.hpp
Outdated
| std::unordered_map<nano::endpoint, syn_cookie_info> syn_cookies; | ||
| std::unordered_map<boost::asio::ip::address, unsigned> syn_cookies_per_ip; | ||
| nano::node & node; | ||
| std::unordered_map<nano::tcp_endpoint, std::vector<nano::endpoint>> response_channels; |
Contributor
There was a problem hiding this comment.
I think nano::network is responsible for managing response channels. Right now it's only udp_channels though we could create a new class tcp_channels which would also be inside nano::network and nano::network is responsible for live messages across all channel types.
nano::network should be able to handle the traffic in a transport-agnostic way.
- common tcp/udp channels functions moved to transport.hpp - added last_packet_sent time_point - RPC peers modified to return channel type with option "peer_details"
- Sizes addes for each message types & subtypes - New count field added to message header extensions (4 bit, max size 15) for confirm_req/confirm_ack by hash - Node ID handshake header flags functions moved to nano::message_header instead from nano::node_id_handshake - Tests expanded to check count extensions field
…id address-reuse issue
wezrule
approved these changes
May 20, 2019
argakiig
approved these changes
May 20, 2019
0b5cfd2 to
4c2d80f
Compare
e6af6c8 to
f0ddbcb
Compare
This was referenced May 22, 2019
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
channel modified to include transport_type, last_packet_sent(Move common UDP/TCP channels functions to transport #1971)Contains rpc.history & rpc.account_history tests fixes(Fix tests failing after PR#1939 #1966)RPC peers modified to return channel type with option "peer_details"(Move common UDP/TCP channels functions to transport #1971)tcp_incoming_connections_max added, max established incoming TCP connections(Add config option tcp_incoming_connections_max #1976)confirm_req/confirm_ack headers improved to include hashes count in extensions for proper using of payload_length_bytes ()(Framing support for realtime network messages #1972)