在Hyperledger Fabric中,是否有一种方法可以重用先前网络的数据? [英] In Hyperledger Fabric, is there a way to reuse the data of previous network?

查看:87
本文介绍了在Hyperledger Fabric中,是否有一种方法可以重用先前网络的数据?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果所有同级都停止工作,如何确保数据不会丢失?

If all the peers stop working, how to make sure that the data is not lost?

谢谢!

推荐答案

我已经通过测试验证了我的想法,但是确切地说,如果您具有genesis.block,channl.tx和对等加密工件,以及/var/hyperledger/orderer和peer的生产,则应将其称为重用而不是重用.您无需再次创建频道并再次加入频道,数据不会丢失.

I have verified my idea through testing, but To be precise, it should be called network restore ranther than reuse,if you have the genesis.block,channl.tx,and peer crypto artifacts, and /var/hyperledger/production of orderer and peer,you can restore same network, and you need not to create channel again and join channle again,the data will not lose.

我已将项目推送到github https://github.com/iamlzw/reuse-previous-network-data.git ,您可以将其拉出并进行测试,如果启动此网络,则无需创建频道和加入频道等,只需查询或调用,停止该网络,可以重新启动,发现数据没有丢失,通过链码查询可以得到相同的结果.

I have push the project to github https://github.com/iamlzw/reuse-previous-network-data.git ,and you can pull it and test,if you start this network ,you need not create channel and join channel and so on ,you can just query or invoke,if you stop this network,you can start it again,and you can find the data not lose,you will get same result throgh by chaincode query.

您可以引用 https://hyperledger-fabric.readthedocs.io/en/release-1.4/chaincode4ade.html#install-hyperledger-fabric-samples

希望这些可以帮助您

这篇关于在Hyperledger Fabric中,是否有一种方法可以重用先前网络的数据?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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