When you say local relay is it something like https://github.com/greenart7c3/Citrine Or just a local database that only damus use?
It uses https://github.com/damus-io/nostrdb which is a zero-copy custom C database built on lmdb with nostr query support. It currently powers damus ios (partially), notedeck, android, and notecrumbs.