Merge #2749: [Budget] Use space and time efficient data structure to check for already sent item sync requests
d8e2c984bdc8d9b67cfe9a3f4eb749cff231323c budget manager: use space and time efficient data structure for unknown item requests. (furszy)
f3a7fea18cd35c7e601a2b715d28d3fd7ad3d0ba budget manager: use g_netfulfilledman instead of mAskedUsForBudgetSync to prevent spam. (furszy)
Pull request description:
In the arriving orphan vote process; the node, after trying to add the vote to the orphan map, tries to ask the proposal/budget to the peer that sent the vote, sending a single item sync request.
The request, as the node can receive several votes going to the same proposal, is relayed only if the node haven't sent a sync request for the proposal already. As we are using a map to perform this membership test, the time complexity is O(log n).
This PR improves it migrating the map to a bloom filter, which time complexity for membership test is O(1).
The false-positive rate, even when it's negligible (i set the rate to 0.001), isn't really a worry here because, as wrote above, this is only use to test for sync proposal request existence, which is not ban cause. It's just used to not send extra unneeded requests.
Plus, aside from that, cleaned the other `mAskedUsForBudgetSync` map, using the already existent net request manager flow.
ACKs for top commit:
random-zebra:
ACK d8e2c984bdc8d9b67cfe9a3f4eb749cff231323c
Fuzzbawls:
ACK d8e2c984bdc8d9b67cfe9a3f4eb749cff231323c
Merge #2745: Error out at startup if there was an internal problem during DMN init
f48176b7cf4e9797f87ad0d331e09c210d06f1e5 CMasternodePayments: remove unnecessary logging (furszy)
51c6ed3afc533726f85ca3b4a643043434081e4b net: no need to reject incoming connections if the node is a Masternode. (furszy)
67283a81875dc865a5c2ee709f5673a57bea51ad Init: activate MN after connman initialization. (furszy)
1bba8306a7553d4ba1c267934c1913c9b51fd16f Init: Error out at startup if there was an internal problem during DMN init. (furszy)
Pull request description:
Follow-up to #2742.
1) Notify user if the Deterministic MN initialization failed for a local non-recoverable error.
2) Moved the startup Masternode activation after the connection manager initialization.
Without it, as the network module isn't initialized, the MN connectivity check always fails.
3) Removed an overkill check that was rejecting incoming connections on Masternodes if the node wasn't, tier two wise, synchronized.
The tier two sync preference for outbound connections can, and will, be achieved differently on a subsequent PR.
ACKs for top commit:
random-zebra:
utACK f48176b7cf4e9797f87ad0d331e09c210d06f1e5
Fuzzbawls:
utACK f48176b7cf4e9797f87ad0d331e09c210d06f1e5