cfb5058018
This is not exactly the protocol-level batching as was tried in #1770 and proposed by neo-project/neo#2365, but it's a TCP-level change in that we now Write() a set of messages and given that Go sets up TCP sockets with TCP_NODELAY by default this is a substantial change, we have less packets generated with the same amount of data. It doesn't change anything on properly connected networks, but the ones with delays benefit from it a lot. This also improves queueing because we no longer generate 32 messages to deliver on transaction's GetData, it's just one stream of bytes with 32 messages inside. Do the same with GetBlocksByIndex, we can have a lot of messages there too. But don't forget about potential peer DoS attacks, if a peer is to request a lot of big blocks we need to flush them before we process the whole set. |
||
---|---|---|
.. | ||
capability | ||
extpool | ||
payload | ||
blockqueue.go | ||
blockqueue_test.go | ||
compress.go | ||
discovery.go | ||
discovery_test.go | ||
fuzz_test.go | ||
helper_test.go | ||
message.go | ||
message_string.go | ||
message_test.go | ||
notary_feer.go | ||
peer.go | ||
prometheus.go | ||
server.go | ||
server_config.go | ||
server_test.go | ||
state_sync.go | ||
tcp_peer.go | ||
tcp_peer_test.go | ||
tcp_transport.go | ||
transport.go |