What are the files in .filecoin directory

Could some one elaborate what is stored in each file/directory in the .filecoin directory for the miner node?
I would like to list them below with my understanding. Please correct me if something is wrong, or add more info to those missed.

  • api: api to talk with go-filecoin daemon
  • badger: k/v database for block/message data??
  • chain: k/v database for chain information - tipset chain?
  • config.json: readable basic configuration of the miner setting
  • deals: k/v database of all deals information (grow when deals coming in)
  • keystore: the miner’s key information, including peerId and wallets private keys?
  • repo.lock: simple lock which makes sure only one daemon is running
  • snapshots: snapshots of configuration when it changes
  • version: the filecoin version (no use)
  • wallet: k/v database for wallet and balance change?

One more questions:
Are all chain related data, and only chain related data saved in badger and chain directories? or in other words, could I just copy these two directories to a new node to speed up the chain syncing?

This all looks correct. I’ll add that chain contains only chain metadata (current head and mapping from tipset cids to aggregate state cid) and badger contains the chain header and message data. badger also contains other things, like the DHT’s persistent storage.

You should try copying over badger and chain directories and report back if it works. Last I heard there may have been some problems with this but I don’t recall if we investigated further (cc @eshon).