iri
iri copied to clipboard
Feature: Store pruned transaction hashes in a cuckoo filter
Description
We want to track pruned confirmed transaction hashes to a cuckoo filter before we delete them. At the end of each pruning cycle we want to persist the cuckoo filter state in the db.
We will currently maintain 10 cuckoo filters maximum, once a new filter gets added (another pruning cycle) the first gets deleted. Each filter is maintained in the database by an index, and when restored from database, the lowest index will be first to get deleted.
Fixes # (issue) #1370
Type of change
- Enhancement (a non-breaking change which adds functionality)
How Has This Been Tested?
- Unit tests added
Checklist:
- [x] My code follows the style guidelines for this project
- [x] I have performed a self-review of my own code
- [x] I have commented my code, particularly in hard-to-understand areas
- [x] I have made corresponding changes to the documentation
- [x] I have added tests that prove my fix is effective or that my feature works
- [x] New and existing unit tests pass locally with my changes
Need to properly prioritize the merging of this PR