hyperledger / hyperledger/fabric

GetHistoryForKey sortable & pageable

Open
#5,107 8 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Go
Stars
16.7k
Forks
9.1k
Avg merge
5h 38m
Merged PRs (30d)
26

Description

### Current Status

In one of our HLF projects, we have a blockchain network in which some assets have thousands of modifications. A client requirements specifies that they need the history of the asset presented ordered by one of the fields of the asset. For now, what we do is use GetHistoryForKey, obtain all entries and order by this field. Then, we build our pagination system on application level, which just to does some splice to mimic a pagination system. We are worried what will happen when an asset haves ten of thousands of entries.

### Expected

Although I am not sure about the viability of this, it would be really helpful to have something to order the results and have some pagination, avoiding memory problems when the asset has too many transactions

### Solution

_No response_

### Please let us know if you plan to work on this.

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.