Page MenuHomePhabricator

[alias-server] Migrate to incremental tx history and alias processing
AbandonedPublic

Authored by bytesofman on Mar 16 2023, 19:43.

Details

Reviewers
emack
Group Reviewers
Restricted Project
Summary

T2966

Depends on D13358

Modify app to work with incremental parsing instead of repeated full parsing. Modified function parseWebsocketMessage to use new incremental functions instead of "do it all" functions. Handled special case of server startup and no aliases in the database, and added this case to aliasTestsLive.js

Test Plan

node index.js
Server starts up okay, adds unprocessed aliases to db
Stop the app
npm run live and tests pass
Delete your mongodb:

mongosh
use eCashAliases
db.confirmedTxHistory.drop()
db.validAliasTxs.drop()

Start the app again with node index.js. All aliases should process and add to db.

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 22748
Build 45116: Build Diff
Build 45115: arc lint + arc unit

Event Timeline

emack requested changes to this revision.Mar 18 2023, 03:08
emack added a subscriber: emack.

same client network socket disconnection issue as D13358

This revision now requires changes to proceed.Mar 18 2023, 03:08

support case of all txs unprocessed in aliasTestsLive.js again

This revision is now accepted and ready to land.Mar 28 2023, 23:07
bytesofman added inline comments.
web/alias-server/websocket.js
93 ↗(On Diff #38644)

This should also be added to the db. Patched in D13410