Hyperledger Fabric中私有数据的历史记录 [英] History For Private Data In Hyperledger Fabric
问题描述
有什么方法可以在Hyperledger Fabric节点SDK中获取私有数据的历史记录.
我尝试使用getHistoryForKey(key)
Is there any way to get the history for Private data in Hyperledger Fabric node SDK.
I've tried using getHistoryForKey(key)
它返回一个只有{ done: true }
推荐答案
获取私有数据历史记录的API尚未实现,但计划在Hyperledger Fabric的未来版本中使用.
The API to get history for private data is not yet implemented, but is planned for a future release of Hyperledger Fabric.
在此期间,您可以向同一事务中的公钥添加一些最少的信息以进行历史跟踪.那可以是逻辑密钥,或者如果密钥本身是敏感的,则可以对逻辑密钥进行哈希处理并将其另存为公共密钥.然后使用公钥上的GetHistoryForKey查找私有数据的事务.
In the interim you could add some minimal information to a public key in the same transaction for historical tracking. That could either be a logical key, or if the key itself is sensitive, you could take a hash of the logical key and save that as a public key. Then use GetHistoryForKey on the public key to find the transactions of the private data.
这篇关于Hyperledger Fabric中私有数据的历史记录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!