Hypeledger Fabric分类帐(WorldState和Blockchain):使用什么数据结构链接这些模块

时间:2019-06-25 16:42:27

标签: hyperledger-fabric

我从worldstate获取密钥的历史数据,用什么搜索算法从节点间的事务中获取历史数据?

我的理解(在每个对等节点上)

-> World state holds Key/Value with version of the latest state (key used to get the latest asset data)
-> Blockchain(LinkedList) in ledger stores transactions in the chained node (on disk in the form of file)
-> If i query history on Key (mostly on World state, as we do not have direct access to chained node)
    --> Is there a hash/index of transactionId and nodeId of chainNodes in Worldstate so that retrieval of history data  against key is quick?
    -->Or chainNodes are Iterated sequentially and data is collected?

1 个答案:

答案 0 :(得分:0)

历史api是基于每个对等体设置的。

在core.yaml文件中,有一个参数ENABLEHISTORYDATABASE设置为true。

默认情况下,历史记录数据库为levelDB,不能更改为任何其他数据库。

从该数据库中查询密钥的历史记录。