-
Notifications
You must be signed in to change notification settings - Fork 8.9k
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
Comments
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. |
But what's the point of storing information in an offchain? One of the keys for blockchain is that data is inmutable. Using an external database will not guarantee inmutability and you will have data by duplicated in multiple datasources and models. |
Thank you for bringing up this issue. I’ve encountered similar challenges when working with Hyperledger Fabric, particularly regarding [mention any specific related issue you faced]. It would be helpful to get more clarity on whether this behavior is expected or if there are any recommended workarounds. Have the maintainers considered addressing this in future releases or providing additional documentation? Any insights would be greatly appreciated! |
@mperlinesfortes does your fabric have storage in leveldb? |
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
The text was updated successfully, but these errors were encountered: