Open dr-orlovsky opened 2 months ago
Dear Maxim,
The bitlight team has recently begun focusing on this issue. After considering your valuable suggestions, we've formulated some design ideas. (Please feel free to correct us if anything is amiss.) We intend to refine this issue according to these concepts and will provide a more detailed description of the specific modifications in the final PR.
Cache Introduction:
Optimization of the create method:
Implementation of the update method:
Expected Optimizations:
API Compatibility:
You can assign the issue to me and I will execute the implementation
I agree that cache is the best way.
The current logic of indexers is implemented in a sub-optimal (from the performance perspective) fashion: many requests for txes are repeated, significantly increasing validation time for the large wallet histories.
Specifically, things which can be improved:
get_history
and using them in resolving previous transaction inputs instead of always queryingget_transaction
methodupdate
method which can leverage the knowledge of past wallet transaction to significantly reduce the number of requests to the indexer