neoneo-go/pkg/network
Roman Khimov 8bb1ecb45a network: remove priority queue from block queue
Use circular buffer which is a bit more appropriate. The problem is that
priority queue accepts and stores equal items which wastes memory even in
normal usage scenario, but it's especially dangerous if the node is stuck for
some reason. In this case it'll accept from peers and put into queue the same
blocks again and again leaking memory up to OOM condition.

Notice that queue length calculation might be wrong in case circular buffer
wraps, but it's not very likely to happen (usually blocks not coming from the
queue are added by consensus and it's not very fast in doing so).
2021-11-01 11:49:01 +03:00
..
capability *: enable godot linter and fix all its warnings 2021-05-12 23:17:03 +03:00
extpool rpc: refactor calculatenetworkfee handler 2021-10-25 19:07:25 +03:00
metrics cli,pkg: use zap.Logger 2020-01-10 11:14:27 +03:00
payload core: implement statesync module 2021-09-07 19:43:27 +03:00
blockqueue.go network: remove priority queue from block queue 2021-11-01 11:49:01 +03:00
blockqueue_test.go network: remove priority queue from block queue 2021-11-01 11:49:01 +03:00
compress.go network: handle length mismatch in decompression routine 2020-08-03 22:38:55 +03:00
discovery.go *: enable godot linter and fix all its warnings 2021-05-12 23:17:03 +03:00
discovery_test.go network: optimize waiting in test 2021-07-08 11:14:35 +03:00
helper_test.go network: fix race in TestHandleGetMPTData 2021-09-13 11:45:48 +03:00
message.go core: implement statesync module 2021-09-07 19:43:27 +03:00
message_string.go core: implement statesync module 2021-09-07 19:43:27 +03:00
message_test.go core: implement statesync module 2021-09-07 19:43:27 +03:00
notary_feer.go core: introduce mempool notifications 2021-02-02 22:01:32 +03:00
peer.go network: support non-blocking broadcast 2020-12-25 14:36:52 +03:00
prometheus.go monitoring: add prometheus monitoring 2019-10-29 20:51:17 +03:00
server.go rpc: refactor calculatenetworkfee handler 2021-10-25 19:07:25 +03:00
server_config.go config: fix duration parameter types 2021-09-25 13:13:51 +03:00
server_test.go rpc: refactor calculatenetworkfee handler 2021-10-25 19:07:25 +03:00
tcp_peer.go core: implement statesync module 2021-09-07 19:43:27 +03:00
tcp_peer_test.go protocol: add capabilities to version payload 2020-05-27 19:01:14 +03:00
tcp_transport.go network: don't log transport errors on exit 2021-07-08 10:40:54 +03:00
transport.go protocol: add capabilities to version payload 2020-05-27 19:01:14 +03:00