-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor: implement minimal RelayInv which doesn't rely on m_connman #6427
base: develop
Are you sure you want to change the base?
refactor: implement minimal RelayInv which doesn't rely on m_connman #6427
Conversation
Vast majority of usages of RelayInv don't use the minProtoVersion, we may as well have these not contribute to contention of m_nodes_mutex / use m_connman
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK a7cd23e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK a7cd23e
@@ -94,7 +94,8 @@ class PeerManager : public CValidationInterface, public NetEventsInterface | |||
virtual void PushInventory(NodeId nodeid, const CInv& inv) = 0; | |||
|
|||
/** Relay inventories to all peers */ | |||
virtual void RelayInv(CInv &inv, const int minProtoVersion = MIN_PEER_PROTO_VERSION) = 0; | |||
virtual void RelayInv(CInv &inv) = 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is it breaking change? It means that some messages can be send to peers even if version is lower than MIN_PEER_PROTO_VERSION
... Will it work fine?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Peers with a version lower than this are disconnected asap:
https://github.com/dashpay/dash/blob/develop/src/version.h#L19-L20
https://github.com/dashpay/dash/blob/develop/src/net_processing.cpp#L3447-L3452
Side note: this made me wonder what versions are used in RelayInv()
calls and we might want to change this line https://github.com/dashpay/dash/blob/develop/src/net_processing.cpp#L3394 so that PostProcessMessage()
would use the fast variant too:
- RelayInv(result.m_inventory.value(), MIN_PEER_PROTO_VERSION);
+ RelayInv(result.m_inventory.value());
Can be done here or in a follow-up PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK a7cd23e
Issue being fixed or feature implemented
Vast majority of usages of RelayInv don't use the minProtoVersion, we may as well have these not contribute to contention of m_nodes_mutex / use m_connman
What was done?
new implementation of RelayInv which doesn't rely on m_connman
How Has This Been Tested?
See CI
Breaking Changes
Checklist: