Join GitHub today
Performance optimization for bloom filters. #2914
This reduces a peer's ability to attack network resources by using a full bloom filter, but without reducing the usability of bloom filters. It sets a default match everything filter for peers and it generalizes a prior optimization to cover more cases.
Automatic sanity-testing: PASSED, see http://jenkins.bluematt.me/pull-tester/37c6389c5a0ca63ae3573440ecdfe95d28ad8f07 for binaries and test log.
* Store rs_t key time in big endian Also implement ConvertInvalidTimeKeys to convert old entries. We can remove this later when we know that most MNs have run this code on testnet. The way we stored the time field in the past lead to CleanupOldRecoveredSigs iterating the keys in a strange order, causing no deletion at all and the LLMQ DB filling up. * Write batch in CleanupOldRecoveredSigs when it gets too large This avoids RAM filling up and OOM getting triggered. * Keep track of when a vote was written to the DB and clean up after week Instead of only deleting when the corresponding recovered sig is deleted. It sometimes happens that a masternode votes on something but a recovered sig is never created, which leaves us with a vote that will never be deleted. * Apply suggestions from code review Co-Authored-By: PastaPastaPasta <email@example.com>