Skip to content

Commit

Permalink
Copyedit, reformat, style consistency (MystenLabs#6720)
Browse files Browse the repository at this point in the history
* Copyedit, reformat, style consistency

* Update doc/src/contribute/observability.md

* Update doc/src/contribute/observability.md

* Update doc/src/contribute/observability.md

* Update doc/src/contribute/observability.md

* Update doc/src/contribute/observability.md

* Update doc/src/contribute/observability.md

* Update doc/src/contribute/observability.md

* Update doc/src/contribute/observability.md

* Update doc/src/contribute/observability.md

* Update install.md

* Update observability.md

Co-authored-by: ronny-mysten <118224482+ronny-mysten@users.noreply.github.com>
  • Loading branch information
randall-Mysten and ronny-mysten authored Dec 12, 2022
1 parent 39e1449 commit 1435482
Show file tree
Hide file tree
Showing 10 changed files with 140 additions and 212 deletions.
40 changes: 14 additions & 26 deletions doc/src/build/fullnode.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ Follow the instructions here to run your own Sui Full node.

### Hardware requirements

Minimum hardware requirements for running a Sui Full node:
Suggested hardware requirements for running a Sui Full node:

* CPUs: 10 core
* RAM: 32 GB
Expand Down Expand Up @@ -90,27 +90,27 @@ Follow the instructions in the [Full node Docker README](https://github.com/Myst
```
1. `cd` into your `sui` repository:
```shell
$ cd sui
cd sui
```
1. Set up the Sui repository as a git remote:
```shell
$ git remote add upstream https://github.com/MystenLabs/sui
git remote add upstream https://github.com/MystenLabs/sui
```
1. Sync your fork:
```shell
$ git fetch upstream
git fetch upstream
```
1. Check out the `devnet` branch:
```shell
$ git checkout --track upstream/devnet
git checkout --track upstream/devnet
```
1. Make a copy of the [Full node YAML template](https://github.com/MystenLabs/sui/blob/main/crates/sui-config/data/fullnode-template.yaml):
```shell
$ cp crates/sui-config/data/fullnode-template.yaml fullnode.yaml
cp crates/sui-config/data/fullnode-template.yaml fullnode.yaml
```
1. Download the [`genesis`](https://github.com/MystenLabs/sui-genesis/raw/main/devnet/genesis.blob) state for Devnet:
```shell
$ curl -fLJO https://github.com/MystenLabs/sui-genesis/raw/main/devnet/genesis.blob
curl -fLJO https://github.com/MystenLabs/sui-genesis/raw/main/devnet/genesis.blob
```
1. Optional: Skip this step to accept the default paths to resources. Edit the `fullnode.yaml` file to use custom paths.
* Update the `db-path` field with the path to the Full node database.
Expand All @@ -124,7 +124,7 @@ Follow the instructions in the [Full node Docker README](https://github.com/Myst
```
1. Start your Sui Full node:
```shell
$ cargo run --release --bin sui-node -- --config-path fullnode.yaml
cargo run --release --bin sui-node -- --config-path fullnode.yaml
```
1. Optional: [Publish / subscribe](event_api.md#subscribe-to-sui-events) to notifications using JSON-RPC via websocket.

Expand Down Expand Up @@ -160,7 +160,7 @@ Whenever Sui releases a new version, Devnet restarts as a new network with no da
Follow the instructions to [reset the environment](https://github.com/MystenLabs/sui/tree/main/docker/fullnode#reset-the-environment),
namely by running the command:
```shell
$ docker-compose down --volumes
docker-compose down --volumes
```

### Update from source
Expand All @@ -171,38 +171,26 @@ Source](#building-from-source), update your Full node as follows:
1. Shut down your currently running Full node.
1. `cd` into your local Sui repository:
```shell
$ cd sui
cd sui
```
1. Remove the old on-disk database and 'genesis.blob' file:
```shell
$ rm -r suidb genesis.blob
rm -r suidb genesis.blob
```
1. Fetch the source from the latest release:
```shell
$ git fetch upstream
git fetch upstream
```
1. Reset your branch:
```shell
$ git checkout -B devnet --track upstream/devnet
git checkout -B devnet --track upstream/devnet
```
1. Download the latest [`genesis`](https://github.com/MystenLabs/sui-genesis/raw/main/devnet/genesis.blob) state for Devnet as described above.
1. Update your `fullnode.yaml` configuration file if needed.
1. Restart your Sui Full node:
```shell
$ cargo run --release --bin sui-node -- --config-path fullnode.yaml
cargo run --release --bin sui-node -- --config-path fullnode.yaml
```
Your Full node starts on:
`http://127.0.0.1:9000`

## Future plans

Today, a Full node relies only on synchronizing with 2f+1 validators in order to
ensure it has seen all committed transactions. In the future, we expect
Full nodes to fully participate in a peer-to-peer (p2p) environment where the
load of disseminating new transactions can be shared with the whole network and
not place the burden solely on the validators. We also expect future
features, such as checkpoints, to enable improved performance of synchronizing the
state of the chain from genesis.

Please see our [privacy policy](https://sui.io/policy/) to learn how we handle
information about our nodes.
47 changes: 22 additions & 25 deletions doc/src/build/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ Sui requires Rust and Cargo on all supported operating systems. Some operating s

Use the following command to install Rust and Cargo on macOS or Linux:
```shell
$ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
```

Windows 11 users can use the [Rust installer](https://www.rust-lang.org/tools/install) available on the Rust website. The installer detects if you do not have the required C++ build tools and prompts you to install. Select the option that best defines your environment and follow the instructions in the install wizard.
Expand All @@ -69,7 +69,7 @@ Sui uses the latest version of Cargo to build and manage dependencies. See the [
Use the following command to update Rust:

```shell
$ rustup update stable
rustup update stable
```

After you install Rust, proceed to the prerequisites for your operating system.
Expand All @@ -84,27 +84,27 @@ After you install Rust, proceed to the prerequisites for your operating system.
Install the prerequisites listed in this section. You should make sure that your system has the latest version of `apt-get`. Use the following command to update `apt-get`:

```shell
$ sudo apt-get update
sudo apt-get update
```

### cURL

Install cURL with the following command:
```shell
$ sudo apt install curl
sudo apt install curl
```

Verify that cURL installed correctly with the following command:
```shell
$ curl --version
curl --version
```

### Git CLI

Run the following command to install Git, including the [Git CLI](https://cli.github.com/):

```shell
$ sudo apt-get install git-all
sudo apt-get install git-all
```

For more information, see [Install Git on Linux](https://github.com/git-guides/install-git#install-git-on-linux) on the GitHub website.
Expand All @@ -118,15 +118,15 @@ Install CMake using the instructions at [Installing CMake](https://cmake.org/ins
Use the following command to install `libssl-dev`:

```shell
$ sudo apt-get install libssl-dev
sudo apt-get install libssl-dev
```

### libclang-dev

Use the following command to install `libclang-dev`:

```shell
$ sudo apt-get install libclang-dev
sudo apt-get install libclang-dev
```

Proceed to [Install Sui binaries](#binaries) to continue installing Sui.
Expand All @@ -140,35 +140,34 @@ macOS includes a version of cURL you can use to install Brew. Use Brew to instal

Use the following command to install [Brew](https://brew.sh/):
```shell
$ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
```

### cURL

Use the following command to update the default [cURL](https://curl.se) on macOS:
```shell
$ brew install curl
brew install curl
```

### CMake

Use the following command to install CMake:
```shell
$ brew install cmake
brew install cmake
```

### Git CLI

Use the following command to install Git:
```shell
$ brew install git
brew install git
```

After installing Git, download and install the [Git command line interface](https://git-scm.com/download/).

Proceed to [Install Sui binaries](#install-sui-binaries) to continue installing Sui.


## Windows prerequisites

Install the following prerequisites to work with Sui on Microsoft Windows 11.
Expand Down Expand Up @@ -197,18 +196,16 @@ Sui requires the following additional tools on computers running Windows.
* [C++ build tools](https://visualstudio.microsoft.com/downloads/) are required to [install Rust](#rust-and-cargo), so you should already have these installed if you followed these instructions.
* The [LLVM Compiler Infrastructure](https://releases.llvm.org/).

>**Tip:** The installation progress might appear hanging if the `cmd.exe` window loses focus;
>press the `enter` key in the command prompt to fix the issue.
>**Known issue:** The `sui console` command does not work in PowerShell.
If the progress appears to freeze, press **Enter** in the command prompt to fix the issue.

**Known issue** - The `sui console` command does not work in PowerShell.

## Install Sui binaries

With Cargo installed, use the following command to install Sui binaries:

```shell
$ cargo install --locked --git https://github.com/MystenLabs/sui.git --branch devnet sui
cargo install --locked --git https://github.com/MystenLabs/sui.git --branch devnet sui
```

The command installs the following Sui components in `~/.cargo/bin`:
Expand All @@ -225,24 +222,24 @@ source "$HOME/.cargo/env"

Confirm the binaries are installed with `.cargo/bin` appearing in your PATH variable:
```
$ echo $PATH
echo $PATH
```
### Windows

Confirm the binaries are installed with `.cargo\bin` appearing in your PATH variable:
```
$ echo %PATH%
echo %PATH%
```
Use the `--help` flag to access helpful information for any of these binaries.

> **Important:** Make sure your entire toolchain stays up-to-date. If you encounter issues building and installing the Sui binaries, update all packages and re-install.
**Important** - Make sure your entire toolchain stays up-to-date. If you encounter issues building and installing the Sui binaries, update all packages and re-install.

## Integrated development environment

The recommended IDE for Move development is [Visual Studio Code](https://code.visualstudio.com/) with the move-analyzer extension. Follow the Visual Studio Marketplace instructions to install the [move-nalyzer extension](https://marketplace.visualstudio.com/items?itemName=move.move-analyzer), passing `address20` using the `--features` flag:

```shell
$ cargo install --git https://github.com/move-language/move move-analyzer --features "address20"
cargo install --git https://github.com/move-language/move move-analyzer --features "address20"
```

See more [IDE options](https://github.com/MystenLabs/awesome-move#ides) in the [Awesome Move](https://github.com/MystenLabs/awesome-move) documentation.
Expand All @@ -254,14 +251,14 @@ To [experiment with Devnet](../build/devnet.md) or [use the Sui Wallet browser e
To request SUI test tokens from the browser extension:

1. Use the Sui Wallet browser extension to open your wallet.
2. Click the **Request Sui Devnet SUI Tokens** button.
1. Click **Request Sui Devnet Tokens**.

To request SUI test tokens in Discord:

1. Join the [Sui Discord](https://discord.com/invite/sui) If you haven’t already.
1. Identify your address through either the Sui Wallet browser extension or by running the following command and electing to connect to a Sui RPC server if prompted:
```shell
$ sui client active-address
sui client active-address
```
1. Request tokens in the [#devnet-faucet](https://discord.com/channels/916379725201563759/971488439931392130) channel using the syntax: `!faucet <YOUR_ADDRESS>`, for example:
```shell
Expand All @@ -277,7 +274,7 @@ https://github.com/MystenLabs/sui
Clone the Sui repository:

```shell
$ git clone https://github.com/MystenLabs/sui.git --branch devnet
git clone https://github.com/MystenLabs/sui.git --branch devnet
```

The following primary directories offer a good starting point for exploring Sui's source code:
Expand Down
4 changes: 2 additions & 2 deletions doc/src/build/sui-json.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ Additionally, Move supports U128 and U256 but JSON doesn't. As a result we allow
| Move Type | SuiJSON Representations | Valid Examples | Invalid Examples |
|----------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| Bool | Bool | `true`, `false` |
| U8 | Three formats are supported<ul><li>Unsigned number &lt; 256. </li><li>Decimal string with value &lt; 256.</li><li>One byte hex string prefixed with `0x`.</li></ul> | `7`<br>`"70"`<br>`"0x43"` | `-5`: negative not allowed<br>`3.9`: float not allowed<br>`NaN`: not allowed<br>`300`: U8 must be less than 256<br>`" 9"`: Spaces not allowed in string<br>`"9A"`: Hex num must be prefixed with `0x`<br>`"0x09CD"`: Too large for U8 |
| U8 | Supports three formats<ul><li>Unsigned number &lt; 256. </li><li>Decimal string with value &lt; 256.</li><li>One byte hex string prefixed with `0x`.</li></ul> | `7`<br>`"70"`<br>`"0x43"` | `-5`: negative not allowed<br>`3.9`: float not allowed<br>`NaN`: not allowed<br>`300`: U8 must be less than 256<br>`" 9"`: Spaces not allowed in string<br>`"9A"`: Hex num must be prefixed with `0x`<br>`"0x09CD"`: Too large for U8 |
| U16 | Three formats are supported<ul><li>Unsigned number &lt; 65536. </li><li>Decimal string with value &lt; 65536.</li><li>Two byte hex string prefixed with `0x`.</li></ul> | `712`<br>`"570"`<br>`"0x423"` | `-5`: negative not allowed<br>`3.9`: float not allowed<br>`NaN`: not allowed<br>`98342300`: U16 must be less than 65536<br>`" 19"`: Spaces not allowed in string<br>`"9EA"`: Hex num must be prefixed with `0x`<br>`"0x049C1D"`: Too large for U16
| U32 | Three formats are supported<ul><li>Unsigned number &lt; 4294967296. </li><li>Decimal string with value &lt; 4294967296.</li><li>One byte hex string prefixed with `0x`.</li></ul> | `9823247`<br>`"987120"`<br>`"0x4BADE93"` | `-5`: negative not allowed<br>`3.9`: float not allowed<br>`NaN`: not allowed<br>`123456789123456`: U32 must be less than 4294967296<br>`" 9"`: Spaces not allowed in string<br>`"9A"`: Hex num must be prefixed with `0x`<br>`"0x3FF1FF9FFDEFF"`: Too large for U32
| U64 | Similarly to U8, three formats are supported<ul><li>Unsigned number &lt; U64::MAX.</li><li>Decimal string with value &lt; U64::MAX.</li><li>Up to 8 byte hex string prefixed with `0x`.</li></ul> | Extrapolate above examples | Extrapolate above examples |
| U128 | Two formats are supported<ul><li>Decimal string with value &lt; U128::MAX.</li><li>Up to 16 byte hex string prefixed with `0x`.</li></ul> | `"74794734937420002470"`<br>`"0x2B1A39A1514E1D8A7CE"` | `34`: Although this is a valid U128 number, it must be encoded as a string |
| U128 | Supports two formats<ul><li>Decimal string with value &lt; U128::MAX.</li><li>Up to 16 byte hex string prefixed with `0x`.</li></ul> | `"74794734937420002470"`<br>`"0x2B1A39A1514E1D8A7CE"` | `34`: Although this is a valid U128 number, it must be encoded as a string |
| U256 | Two formats are supported<ul><li>Decimal string with value &lt; U256::MAX.</li><li>Up to 32 byte hex string prefixed with `0x`.</li></ul> | `"747947349374200024707479473493742000247"`<br>`"0x2B1762FECADA39753FCAB2A1514E1D8A7CE"` | `123434`: Although this is a valid U256 number, it must be encoded as a string |
| Address | 20 byte hex string prefixed with `0x` | `"0x2B1A39A1514E1D8A7CE45919CFEB4FEE70B4E011"` | `0x2B1A39`: string too short<br>`2B1A39A1514E1D8A7CE45919CFEB4FEE70B4E011`: missing `0x` prefix<br>`0xG2B1A39A1514E1D8A7CE45919CFEB4FEE70B4E01`: invalid hex char `G` |
| ObjectID | 20 byte hex string prefixed with `0x` | `"0x2B1A39A1514E1D8A7CE45919CFEB4FEE"` | Similar to above |
Expand Down
Loading

0 comments on commit 1435482

Please sign in to comment.