Query sorting support for pagination
Add support for sorting query results in Iroha2 before applying pagination (start, limit). For example add multiple assets of type "AssetValueType.Store" and then query top 5 sorted by some value in Metadata.
This is very likely going to be a wontfix.
Server side sorting for all queries is very likely to cause major abuse from users.
Best we can do is allow sorting in middleware that communicates with an Iroha peer.
This looks like a duplicate of #2501.
@appetrosyan I suggested a decision some time ago. This is based on sorting assets by timestamps in a b-tree map. It seems your suggestion is very similar but would force the sorting of assets on every request.
So the approach that you propose is going to more than double the size of a structure that is already going to account for 80% of all traffic inside a block. We've had to go to extreme lengths to reduce the size previously.
it will be solved here (#2553).