简体   繁体   English

分类帐或stateDB在哪里存储在Fabric的对等文件系统中

[英]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 这是方法

  1. use command docker ps to view all your peers then choose a peer to view data inside 使用命令docker ps查看所有对等方,然后选择一个对等方以查看内部数据
  2. docker exec -it container_id bash to open peer cli docker exec -it container_id bash打开对等cli
  3. change directory to /var/hyperledger/production/ledgersData then you can see folder named chains , your data u need is place inside 将目录更改为/ var / hyperledger / production / ledgersData,然后您可以看到名为chains的文件夹,您需要的数据位于其中

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 参数在哪里存储在请求对象中? - where does parameters get stored in Request Object? H2数据库存储在哪里? - Where does the H2 database get stored? Hyperledger Fabric-sendTransactionProposal()将块提交到分类帐吗? - Hyperledger Fabric - sendTransactionProposal() commits block to the ledger? 当StringBuffer创建String对象时,它在哪里存储在内存中? - Where does String object get stored in memory when created by StringBuffer? 构造函数调用存储在哪里?堆栈还是堆? - Where does the constructor invocation get stored? Stack or Heap? 在 bamboo 中执行脚本时,下载的文件存储在哪里? - Where does the downloaded file get stored while executing a script in bamboo? 类、对象、引用变量在 Java 中存储在哪里。 在堆中还是在堆栈中? 堆或栈位于何处? - Where does class, object, reference variable get stored in Java. In heap or in stack? Where is heap or stack located? 如何通过 REST API 将数据插入超账本结构网络(区块链) - How to insert the data into hyper-ledger fabric fabric network (block-chain) through REST APIs Blackberry Simulator FileSystem:它在哪里? - Blackberry Simulator FileSystem: where is it? java引用变量存储在哪里? - Where does java reference variable stored?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM