HomePhabricator

[alias-server] Support for pending alias txs

Description

[alias-server] Support for pending alias txs

Summary:
T3060

Support for adding and removing pending aliases from a dedicated pending aliases collection

Caching is introduced so that tipHeight is available inside the added to mempool event. It would be available from serverState in the database, but deemed impractical to make a database call on every incoming tx (could be a huge throughput of these) for a value that only changes every 10 minutes on avg.

pending alias registrations that become valid alias registrations are removed from the cache.

pending aliases are added to the cache on app startup.

pending aliases that go more than 6 confirmations without becoming confirmed or otherwise cleaned up are dropped from the pending collection to prevent unbounded growth.

Test Plan: npm test

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Subscribers: Fabien

Differential Revision: https://reviews.bitcoinabc.org/D14201

Details

Provenance
bytesofmanAuthored on Aug 15 2023, 17:55
bytesofmanPushed on Sep 14 2023, 17:07
Reviewer
Restricted Project
Differential Revision
D14201: [alias-server] Support for pending alias txs
Parents
rABC39547735be35: [ecash-herald] Restrict length of unknown op-return msgs
Branches
Unknown
Tags
Unknown