* add storage cache
* use event emitter to call revokeMessagesBySigner in engine
* test engine listeners
* log engine start and stop
* fix prune messages cron
* add more processEvent tests
* ensure event listeners are removed on engine stop
* move validation worker back into constructor
* fix imports
* more logging in engine and storage cache
* prune events after 3 days
* use fromId option
* schedule prune events job
* update default cron schedule and log any prune events errors
* update default prune events time limit to use ms
Using `fs.watch` uses `inotify`, which doesn't work with network file
systems like EFS where other kernels could be responsible for changes to
the file system.
Instead, check every 10 seconds to see if there is a change.
Ran this locally and it seemed to work fine.
* fix: Fix memory leak in prune messages job
* Add end() to nameRegistryTest iterator
* refactor rocksdb iterator to use promises
* simplify next API
* clear iterator when paginating
* change prune messages cron back to every hour
* clear iterators from pagination methods
* fix build
---------
Co-authored-by: Paul Fletcher-Hill <pfletcherhill@gmail.com>
* chore: update all devDependencies to the latest versions
* chore: update @noble/hashes to 1.3.0
* chore: update @swc/core to 1.3.41
* chore: update @noble/ed25519 by a patch version
* chore: update ts-proto and eslint/parser dev deps
* chore: upgrade pino minor version
* chore: upgrade tsx minor version
* chore: add changeset
* poc
* address pr feedback, add pagination to getAllSignerMessagesByFid
* fix types
* use bytes and uint32
* move makeEndPrefix into utils
* getSignersByFid
* fix: getCastsByFid should return items in reverse chronological order
* returns casts in chronological order
* fix: getCastsByFid should return casts in chronological order
In the RocksDB iterator we use to construct thashes for the messages query, select only the CastMessages which are CastAdds
* rename page options and move page iterator to message file
* intermediate commit
* fix tests
* use suffixes as tokens rather than full keys
* remove commented out code
* paginate getCastsByParent, getCastsByMention, getReactionsByCast
* add changeset and fix linting
* update multiPeerSyncEngine test
* add more tests
* fix import
---------
Co-authored-by: bstchow <36556453+bstchow@users.noreply.github.com>
Co-authored-by: Paul Fletcher-Hill <pfletcherhill@gmail.com>
* add: SignerAdd and SignerRemove to message.proto
* add: finish message.proto and validations
* progress: refactor signer factory
* update tests to support signerAddBody and signerRemoveBody
* add changeset
---------
Co-authored-by: Paul Fletcher-Hill <pfletcherhill@gmail.com>