简体   繁体   中英

What are the files that require backup (ledger) in sawtooth validator

  • What are the main set of files that are required for orchestration of new network from old data from old sawtooth network ( I don't want to extend old sawtooth network).

I want to backup the essential files that are crucial for the operation of the network from the last block in the ledger.

  • I have list of files that were generated in sawtooth validator and with poet concenses:
    • block-00.lmdb
    • poet-key-state-0371cbed.lmdb
    • block-00.lmdb-lock
    • poet_consensus_state-020a4912.lmdb
    • block-chain-id
    • poet_consensus_state-020a4912.lmdb-lock
    • merkle-00.lmdb
    • poet_consensus_state-0371cbed.lmdb
    • merkle-00.lmdb-lock
    • txn_receipts-00.lmdb
    • poet-key-state-020a4912.lmdb
    • txn_receipts-00.lmdb-lock
    • poet-key-state-020a4912.lmdb-lock
  • What is the significance of each file and what are the consequences if not included when restarting the network or creation of new network with old data in ledger.

Answer for this question could bloat, I will cover most part of it here for the benefit of folks who have this question, especially this will help when they want to deploy the network through Kubernetes. Also similar questions are being asked frequently in the official RocketChat channel.

The essential set of files for the Validator and the PoET are stored in /etc/sawtooth (keys and config directory) and /var/lib/sawtooth (data directory) directories by default, unless changed. Create a mounted volume for these so that they can be reused when a new instance is orchestrated.

Here's the file through which the default validator paths can be changed https://github.com/hyperledger/sawtooth-core/blob/master/validator/packaging/path.toml.example

Note that you've missed keys in the list of essential files in your question and that plays important role in the network. In case of PoET each enclave registration information is stored in the Validator Registry against the Validator's public key. In case of Raft/PBFT consensus engine makes use of keys (members list info) to send peer-peer messages.

In case of Raft the data directory it is /var/lib/sawtooth-raft-engine .

Significance of each of the file you listed may not be important for the most people. However, here goes explanation on important ones

  • *-lock files you see are system generated. If you see these, then one of the process must have opened the file for write.
  • block-00.lmdb it's the block store/block chain, has KV pair of block-id to block information. It's also possible to index blocks by other keys. Hyperledger Sawtooth documentation is right place to understand complete details.
  • merkle-00.lmdb is to store the state root hash/global state. It's merkle tree representation in KV pair.
  • txn-receipts-00.lmdb file is where transaction execution status is stored upon success. This also has information about events if any associated with those transactions.

这是锯齿常见问题解答中的文件列表: https : //sawtooth.hyperledger.org/faq/validator/#what-files-does-sawtooth-use

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM