我从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?
答案 0 :(得分:0)
历史api是基于每个对等体设置的。
在core.yaml文件中,有一个参数ENABLEHISTORYDATABASE设置为true。
默认情况下,历史记录数据库为levelDB,不能更改为任何其他数据库。
从该数据库中查询密钥的历史记录。