- Go version >= 1.18.0
- (Optional) (for reading from LevelDB using C lib) LevelDB version >= 1.7 and snappy
go run main.goTo run with C lib support for LevelDB:
CGO_ENABLED=1 CGO_LDFLAGS="-lsnappy" go run -tags "cleveldb" main.goEnvironment variable options
INITIAL_STATE_DATA_DIR: Directory path of initial state dataINITIAL_STATE_DATA_FILENAME: File name of ABCI initial state data file [Default:data]BACKUP_VALIDATORS_FILENAME: File name of validators backup dataCHAIN_HISTORY_FILENAME: File name of chain history data [Default:chain_history]
Specific to create-initial-state-data command
TM_HOME: Source Tendermint home directory pathABCI_DB_DIR_PATH: Source ABCI state DB directory path
Specific to restore command
NDID_NODE_ID: NDID node ID [Default:NDID]KEY_DIR: NDID node key directory path [Default:./dev_keys/]TENDERMINT_RPC_HOST: Tendermint RPC host [Default:localhost]TENDERMINT_RPC_PORT: Tendermint RPC port [Default:45000]
- Run backup with command
create-initial-state-data [fromVersion] [toVersion]
Example:
go run main.go create-initial-state-data 4 5- Run restore with command
restore [toVersion]
Example:
go run main.go restore 5- Run create initial state data with command
create-initial-state-data [fromVersion] [toVersion]
Example:
go run main.go create-initial-state-data 6 7- Use created initial state data with Tendermint/ABCI for
InitChain. Refer to https://github.com/ndidplatform/smart-contract for usage.