Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GetHistoryForKey sortable & pageable #5107

Open
mperlinesfortes opened this issue Jan 16, 2025 · 1 comment
Open

GetHistoryForKey sortable & pageable #5107

mperlinesfortes opened this issue Jan 16, 2025 · 1 comment

Comments

@mperlinesfortes
Copy link

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

@bestbeforetoday
Copy link
Member

An option to consider is replicating relevant ledger data in an off-chain data store, where you can more efficiently query and present the required information. The off_chain_data sample in the fabric-samples repository contains some discussion and example implementations to achieve this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants