Hyperledger Fabric中私有数据的历史记录 [英] History For Private Data In Hyperledger Fabric

查看:281
本文介绍了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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆