Libra链节点安装

Libra

Libra.jpg

这里是Libra链节点的安装教程,安装环境是Ubuntu 16.04.6 LTS。

节点安装

官方文档https://developers.libra.org/docs/my-first-transaction

clone源码

git clone https://github.com/libra/libra.git

安装Libra Core

cd libra
./scripts/dev_setup.sh

提示需要安装一些依赖

 build Libra Core. This includes:
    * Rust (and the necessary components, e.g. rust-fmt, clippy)
    * CMake, protobuf, go (for building protobuf)
 
 If you'd prefer to install these dependencies yourself, please exit this script
 now with Ctrl-C.
 
 Proceed with installing necessary dependencies? (y/N) > y

键入y会自动安装。

……
Finished installing all dependencies.

You should now be able to build the project by running:
    source /root/.cargo/env
    cargo build

构建Libra cli客户端并连接到测试网络

./scripts/cli/start_cli_testnet.sh
Building and running client in debug mode.
    Updating crates.io index
    Updating git repository `https://github.com/pingcap/rust-rocksdb.git`
    Updating git repository `https://github.com/alexcrichton/bzip2-rs.git`
       Fetch [==============>                                        ]  27.65%

等待Updating Downloading Building结束后进入cli客户端。

   ……
   Compiling client v0.1.0 (/data/libra/client)
    Finished dev [unoptimized + debuginfo] target(s) in 17m 02s
     Running `target/debug/client --host ac.testnet.libra.org --port 8000 -s ./scripts/cli/trusted_peers.config.toml`
Connected to validator at: ac.testnet.libra.org:8000
usage: <command> <args>

Use the following commands:

account | a 
    Account operations
query | q 
    Query operations
transfer | transferb | t | tb 
    <sender_account_address>|<sender_account_ref_id> <receiver_account_address>|<receiver_account_ref_id> <number_of_coins> [gas_unit_price_in_micro_libras (default=0)] [max_gas_amount_in_micro_libras (default 10000)] Suffix 'b' is for blocking. 
    Transfer coins (in libra) from account to another.
help | h 
    Prints this help
quit | q! 
    Exit this client


Please, input commands: 

libra% 

cli客户端

先写这么多,等客户端研究明白了再写。

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。