[英]Where does the ledger or the stateDB get stored in a peer filesystem in Fabric
I am studying and running samples from the Hyperledger Fabric samples . 我正在研究和运行Hyperledger Fabric样本中的样本。
According to my understanding : 据我了解:
There are two place which "store" data in Hyperledger Fabric:- 在Hyperledger Fabric中有两个地方可以“存储”数据:
->the ledger -> 分类帐
->the state database -> 状态数据库
The state database is simply an indexed view into the chain's/ledger's transaction log, it can therefore be regenerated from the chain at any time. 状态数据库只是链/账本交易日志的索引视图,因此可以随时从链中重新生成它。
There are currently two options for the state database: an embedded LevelDB or an external CouchDB . 当前状态数据库有两个选项:嵌入式LevelDB或外部CouchDB 。
I want to know where the blockchain/ledger or the database gets stored in the filesystem . 我想知道区块链/分类帐或数据库在文件系统中的存储位置。 Is it stored in a specific directory or a specific port (in case of levelDB as well as couchdb)
它存储在特定的目录或特定的端口中(对于levelDB和Sofadb)
For the levelDB one, it is stored under the path /var/hyperledger/production/ledgersData, in which you can find two directories called chains and stateLeveldb . 对于性LevelDB之一,它存储路径下的/ var / hyperledger /生产/ ledgersData,在这里您可以找到两个目录称为链和stateLeveldb。 You can try to go into the peer container and have a look.
您可以尝试进入对等容器并进行查看。
Here is the way 这是方法
docker ps
to view all your peers then choose a peer to view data inside docker ps
查看所有对等方,然后选择一个对等方以查看内部数据 docker exec -it container_id bash
to open peer cli docker exec -it container_id bash
打开对等cli
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.