HomePhabricator

[Cashtab] Batch utxo requests to hydrateUtxos

Description

[Cashtab] Batch utxo requests to hydrateUtxos

Summary:
Group calls to BCH.SLP.Utils.hydrateUtxos by batches of utxos, set by new parameter in Ticker.js, for now to 20 to match typical limit in bch-api. The usual batch size limit of 20 is not correctly implemented for the hydrateUtxos method in bch-api. Instead, it will accept unlimited utxos from up to 20 addresses.

This performance optimization will eventually need to be implemented on bch-api to prevent ddos. In the meantime, implementing it here as Cashtab will need to work with bch-api limits.

Test Plan: npm test; also go ahead and give it an npm start and confirm balance and tokens match what is displayed from cashtabapp.com

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Subscribers: Fabien

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

Details

Provenance
Joey King <joseph.roy.king@gmail.com>Authored on Apr 9 2021, 14:27
bytesofmanPushed on Apr 12 2021, 19:48
Reviewer
Restricted Project
Differential Revision
D9393: [Cashtab] Batch utxo requests to hydrateUtxos
Parents
rABC45d5037db635: Add -overridednsseed for testing DNS seed behavior
Branches
Unknown
Tags
Unknown

Event Timeline