Consensus optimization during transaction request #1077
Labels
consensus
Module - Changes that affect the consensus protocol or internal verification logic
enhancement
Type - Changes that may affect performance, usability or add new features to existing modules.
ready-to-implement
Issue state: Ready to be implemented or implementation in progress
When reviewing #1040 an issue was discovered and a possible optimization.
The first thing we can see is in the following lines
neo/neo/Consensus/ConsensusService.cs
Lines 465 to 468 in 919cc80
We are creating an inventory of the pending transaction hashes, but calling the wrong method, we should call
neo/neo/Network/P2P/Payloads/InvPayload.cs
Lines 27 to 35 in 919cc80
Because it control the limits by
MaxHashesCount
and the other doesn't.This is the first issue, the next one is an improve.
As you know, in P2P was added a compression mechanism (#710), compression is ver useful for improve the TPS, but is better on bigger messages than smaller. So if a node is asking about 500 TX, why we should send it one by one? We should pack all of this tx, and send in a bulk message. Is more optimal and can save resources.
neo/neo/Network/P2P/ProtocolHandler.cs
Lines 180 to 211 in 919cc80
The text was updated successfully, but these errors were encountered: