From 9a597c80e93af16ba0f9e81d046e151299bb8aa1 Mon Sep 17 00:00:00 2001 From: Patrick Kuo Date: Thu, 10 Feb 2022 09:39:20 +0000 Subject: [PATCH] [fastx CLI] Update README.md for fastx and wallet binaries (#404) * readme for interactive shell and fastx * typo --- README.md | 69 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) diff --git a/README.md b/README.md index c941b62536a8a..0bdf75cfce092 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,75 @@ Sui extends Sui by allowing objects to be transacted. Sui allows a set of distributed authorities, some of which are Byzantine, to maintain a high-integrity and availability settlement system for pre-funded payments. It can be used to settle payments in a native unit of value (crypto-currency), or as a financial side-infrastructure to support retail payments in fiat currencies. Sui is based on Byzantine Consistent Broadcast as its core primitive, foregoing the expenses of full atomic commit channels (consensus). The resulting system has low-latency for both confirmation and payment finality. Remarkably, each authority can be sharded across many machines to allow unbounded horizontal scalability. Our experiments demonstrate intra-continental confirmation latency of less than 100ms, making Sui applicable to point of sale payments. In laboratory environments, we achieve over 80,000 transactions per second with 20 authorities---surpassing the requirements of current retail card payment networks, while significantly increasing their robustness. +## Quickstart with local Sui network and interactive wallet +### 1. Build the binaries +```shell +cargo build --release +cd target/release +``` +This will create `fastx` and `wallet` binaries in `target/release` directory. + +### 2. Genesis +```shell +./fastx genesis +``` +The genesis command creates 4 authorities, 5 user accounts each with 5 gas objects. +The network configuration are stored in `network.conf` and can be used subsequently to start the network. +A `wallet.conf` will also be generated to be used by the `wallet` binary to manage the newly created accounts. + +### 3. Starting the network +Run the following command to start the local Sui network: +```shell +./fastx start +``` +or +```shell +./fastx start --config [config file path] +``` +The network config file path is defaulted to `./network.conf` if not specified. + +### 4. Running interactive wallet +To start the interactive wallet: +```shell +./wallet +``` +or +```shell +./wallet --config [config file path] +``` +The wallet config file path is defaulted to `./wallet.conf` if not specified. + +The following commands are supported by the interactive wallet: + + addresses Obtain the Account Addresses managed by the wallet + call Call Move + help Prints this message or the help of the given subcommand(s) + new-address Generate new address and keypair + object Get obj info + objects Obtain all objects owned by the account address + publish Publish Move modules + sync Synchronize client state with authorities + transfer Transfer funds + +Use `help ` to see more information on each command. + +### 5. Using the wallet without interactive shell +The wallet can also be use without the interactive shell +```shell +USAGE: + wallet --no-shell [SUBCOMMAND] +``` +#### Example +```shell +sui@MystenLab release % ./wallet --no-shell addresses +Showing 5 results. +4f145f9a706ae4932452c90ce006fbddc8ab2ced34584f26d8953df14a76463e +47ea7f45ca66fc295cd10fbdf8a41828db2ed71c145476c710e04871758f48e9 +e91c22628771f1465947fe328ed47983b1a1013afbdd1c8ded2009ec4812054d +9420c11579a0e4a75a48034d9617fd68406de4d59912e9d08f5aaf5808b7013c +1be661a8d7157bffbb2cf7f652d270bbefb07b0b436aa10f2c8bdedcadcc22cb +``` + ## Quickstart with Sui Prototype ```bash