Tutorials on Upgrading BTFS v1.0 to BTFS v2.0 Mainnet

Pre-upgrade preparation

Export the version 1.0 private key, which is used to transfer the assets out of the 1.0 node,
Please refer to “Get Private Key in Hex Format” in the document below.
https://docs.btfs.io/v1.0/docs/withdraw-btt-from-btfs (Copy this link to browser to open)

Upgrade steps

Step 1: Download and launch BTFS v2.1.0 release

  • Download the BTFS v2.1.0 release, please refer to https://github.com/bittorrent/go-btfs/releases to choose the corresponding system and architecture.
  • Rename the downloaded file(unzip it first if it is a compressed file) as “btfs”. Replace the btfs file in version 1.0.
  • Run BTFS daemon via the following command line(199 is the corresponding chain ID of BTTC, make sure using the new btfs file),
$ ./btfs daemon --chain-id 199
Initializing daemon...
go-btfs version: 2.1.0
Repo version: 10
System version: amd64/darwin
Golang version: go1.16.5
Repo location: /Users/btfs/.btfs
Peer identity: 16Uiu2HAmKFQPM72SssFRrqcH1qwUsPwcp7vXSg3SEzfdYua1J5qc
the address of Bttc format is:  0x7Cf4B71017F0312037D53fe966CE625BF98FFff6
the address of Tron format is:  TMMuwwxsuQGrDrN3aanc5y5r4FbibgLYDa
cannot continue until there is sufficient (100 Suggested) BTT (for Gas) available on 0x7cf4b71017f0312037d53fe966ce625bf98ffff6

Step 2: Recharge enough BTT to the BTTC address output in the boot log, suggests a minimum of 100 BTT, which is used as gas to deploy a node vault contract by the node account.

Solutions to common errors init settlement err: init vault service: vault init: not a valid factory contract

I,The correct way to upgrade.

  1. Make sure the current version is version 1.6.0 (or other 1.x versions)
  2. Refer to the official documentation to upgrade (https://docs.btfs.io/docs/tutorials-on-upgrading-btfs-v10-to-btfs-v20-mainnet) (Copy this link to open in your browser)

II,The wrong way to upgrade.
If you upgraded btfs-2.x version before, and now upgrade btfs-2.1.0, you will get an error init settlement err: init vault service: vault init: not a valid factory contract, at this time you need to save the private key and file data first, and then upgrade 2.1. 0 version upgrade.

The solution is as follows.

  1. Enter the current BTFS-PATH directory (usually under ~/.btfs) and backup config and blocks (note that the private key is in config and the previously uploaded data is in the blocks folder)
  2. Download btfs-2.1.0 for upgrade, refer to the official documentation, and note that after btfs init, replace the backup config and blocks with the existing ones, and then btfs daemon refer to the official documentation, so that it can be processed.


  • After BTFS v2.1.0 Mainnet goes live, the to-be-distributed storage rewards of BTFS v1.0 nodes will be given away altogether to their BTFS off-chain wallets.
  • The contract files stored on BTFS v1.0 Mainnet will remain despite the upgrade from BTFS v1.0 to BTFS v2.1.0 Mainnet. The airdrop rewards will be distributed to the corresponding BTTC on-chain wallets of BTFS v2.0 nodes in the form of BTT tokens.
  • Upgrade process do not delete the old data, do not modify the original private key, otherwise it affects the old data reward, but also additional synchronization time .