BigchainDB命令行
bigchaindb --help
帮助信息,可以是bigchaindb -h
bigchaindb --version
查看版本,可以是bigchaindb -v
bigchaindb configure
获取配置文件,后端数据库类型只支持localmongodb
,-c
选项可指定配置文件路径。默认文件路径为$HOME/.bigchaindb
,-y
选项所有参数将使用默认值。
bigchaindb -c path/to/new_config.json configure localmongodb
bigchaindb show-config
显示配置值
bigchaindb init
初始化,创建初始表、索引等。
bigchaindb drop
删除数据库。
bigchaindb start
启动BigchainDB,如果没有初始化会先执行bigchaindb init
,可以用命令bigchaindb start --no-init
跳过。用--log-level
或-l
指定日志的级别。
$ bigchaindb --log-level INFO start
bigchaindb election
管理选举以管理BigchainDB网络。选举过程的细节在BEP-18中定义。选举管理分为几个子命令。下面是每个命令行的语法。
$ bigchaindb election new upsert-validator <public-key> <power> <node-id> --private-key <path-to-the-private-key>
$ bigchaindb election new upsert-validator HHG0IQRybpT6nJMIWWFWhMczCLHt6xcm7eP52GnGuPY= 1 fb7140f03a4ffad899fabbbf655b97e0321add66 --private-key /home/user/.tendermint/config/priv_validator.json
[SUCCESS] Submitted proposal with id: 04a067582cf03eba2b53b82e4adb5ece424474cbd4f7183780855a93ac5e3caa
$ bigchaindb election new chain-migration --private-key <path-to-the-private-key>
$ bigchaindb election new migration --private-key /home/user/.tendermint/config/priv_validator.json
[SUCCESS] Submitted proposal with id: 04a067582cf03eba2b53b82e4adb5ece424474cbd4f7183780855a93ac5e3caa
$ bigchaindb election approve <election-id> --private-key <path-to-the-private-key>
$ bigchaindb election approve 04a067582cf03eba2b53b82e4adb5ece424474cbd4f7183780855a93ac5e3caa --private-key /home/user/.tendermint/config/priv_validator.json
[SUCCESS] Your vote has been submitted
$ bigchaindb election show <election-id>
status=<status>
bigchaindb tendermint-version
$ bigchaindb tendermint-version
{
"description": "BigchainDB supports the following Tendermint version(s)",
"tendermint": [
"0.22.8"
]
}