iroha icon indicating copy to clipboard operation
iroha copied to clipboard

Move `asset_total_amount` inside the asset definition

Open DCNick3 opened this issue 1 year ago • 0 comments

Currently we store asset_total_amount as a separate collection inside WSV that maps AssetDefinitionId to the running total of a numeric asset existing.

As suggested by @mversic on daily, this collection can merged into AssetDefinition, making it just a field of it. This will help with getting rid of FindTotalAssetQuantityByAssetDefinitionId singular query (#4933).

Potential drawbacks

May increase lock contention as more accesses will be done to a single collection instead of separate collections.

DCNick3 avatar Aug 05 '24 08:08 DCNick3