Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updates to multiple topics to address issues, style, and discoverability #4960

Merged
merged 5 commits into from
Oct 6, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 10 additions & 12 deletions doc/src/build/devnet.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,21 @@
title: Connect to Sui Devnet
---

Welcome to the Sui Devnet. We are hosting a public Devnet for the community to experiment with our tech and help to shape the future of the Sui network. It exists to gain operational experience with the Sui software in a public setting prior to our Mainnet launch.
We are hosting a public Devnet for the community to experiment with Sui and provide feedback to help to shape the future of the Sui network.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove "to" between "help" and "shape"


The Sui Devnet currently consists of:
The Sui Devnet network currently consists of:

* A four-validator network with all nodes operated by Mysten Labs. Clients send transactions and read requests via this endpoint: gateway.devnet.sui.io:443 using [JSON-RPC](../build/json-rpc.md)
* Four validator nodes operated by Mysten Labs. Clients send transactions and read requests via this endpoint: gateway.devnet.sui.io:443 using [JSON-RPC](../build/json-rpc.md)
* A public network [Sui Explorer](https://explorer.devnet.sui.io) for browsing transaction history.
* A [Discord channel](https://discordapp.com/channels/916379725201563759/971488439931392130) for requesting test coins that can be used to pay for gas on the test network. These coins have no financial value and will disappear each time we reset the network.

Many improvements to the Sui Devnet are underway, such as the ability to run full nodes and use a browser-based wallet. See the [Sui Devnet blog post](https://medium.com/mysten-labs/sui-devnet-public-release-a2be304ff36b) announcement for full details on upcoming features. All Devnet usage is subject to our [terms of service](https://sui.io/terms/).
Watch for update announcements in the [#devnet-updates](https://discord.com/channels/916379725201563759/1004638487078772736) Discord channel.

See the [terms of service](https://sui.io/terms/) for using the Devnet network.

## Tools

We provide the following tools for users to interact with the Sui Devnet:
We provide the following tools for users to interact with Sui Devnet:

* The [Sui command line interface (CLI)](../build/cli-client.md)
* create and manage your private keys
Expand All @@ -38,9 +40,7 @@ $ which sui
```
You should see the path to the command. Otherwise, reinstall.

> **Tip:** To reliably test Devnet with the latest Sui binaries, re-install them at least weekly.

In addition, to conduct advanced work such as publishing a Move module or making a Move call, also obtain the [Sui source code](../build/install.md#source-code); for simplicity, we recommend installing in `~/sui` or using an environment variable.
> **Tip:** Check the [Sui Releases](https://github.com/MystenLabs/sui/releases) page to make sure you have the latest release.

## Configure the Sui client

Expand All @@ -58,11 +58,9 @@ Type `y` and then press `Enter`. You should see the following output:
```shell
Sui RPC server Url (Default to Sui Devnet if not specified) :
```
The Sui client will prompt for the RPC server URL; press 'Enter' and it will default to Devnet.
Or enter a custom URL to connect to a server hosted elsewhere.
The Sui client prompts you for the RPC server URL; press 'Enter' and it defaults to Devnet. You can also enter a custom URL to connect to a custom RPC endpoint.
Copy link

@waynecun waynecun Oct 6, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove single quotes around Enter


If you have used the Sui client before with a local network, you will have an existing `client.yaml` configuration
file needing update. Change the configured RPC server URL to Devnet by using:
If you previously installed a Sui client with a local network, modify your existing `client.yaml` to change the RPC endpoint with the following command:
```shell
$ sui client switch --rpc https://gateway.devnet.sui.io:443
```
Expand Down
88 changes: 40 additions & 48 deletions doc/src/build/fullnode.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,30 +2,30 @@
title: Run a Sui Fullnode
---

Sui fullnodes run a service that
Sui full nodes run a service that
stores the full blockchain state and history. They service reads, either for
end clients or by helping other fullnodes get up-to-date with the latest
end clients or by helping other full nodes get up-to-date with the latest
transactions that have been committed to the chain.

This role enables
[validators](../learn/architecture/validators.md) (or miners in
other networks) to focus on servicing the write path and processing
transactions as fast as possible. Once a validator has committed a new set of
transactions (or a block of transactions), the validator will push that block
to a fullnode (potentially a number of fullnodes) who will then in turn
to a full node (potentially a number of full nodes) who will then in turn
disseminate it to the rest of the network.

## Features

Sui fullnodes exist to:
Sui full nodes exist to:

* Track and verify the state of the blockchain, independently and locally.
* Serve read requests from clients.
* Conduct local app testing against verified data.

## State synchronization

Today Sui fullnodes sync with validators to be able to learn about newly
Today Sui full nodes sync with validators to be able to learn about newly
committed transactions.

The normal life of a transaction requires a few round trips to 2f+1 validators
Expand All @@ -39,50 +39,45 @@ Today, this synchronization process is performed by:
1. Locally executing the transaction and updating the local DB.

This synchronization process is far from ideal as it requires listening
to at a minimum 2f+1 validators to ensure that a fullnode has properly seen all
to at a minimum 2f+1 validators to ensure that a full node has properly seen all
new transactions. Over time, we will improve this process (e.g. with the
introduction of checkpoints, ability to synchronize with other fullnodes,
etc.) in order to have better guarantees around a fullnode’s ability to be
introduction of checkpoints, ability to synchronize with other full nodes,
etc.) in order to have better guarantees around a full node’s ability to be
confident it has seen all recent transactions.

## Architecture

The Sui fullnode is essentially a read-only view of the network state. Unlike
validator nodes, fullnodes cannot sign transactions, although they can validate
The Sui full node is essentially a read-only view of the network state. Unlike
validator nodes, full nodes cannot sign transactions, although they can validate
the integrity of the chain by re-executing transactions that were previously
committed by a quorum of validators.

Today, a fullnode is expected to maintain the full history of the chain; in the
Today, a full node is expected to maintain the full history of the chain; in the
future, sufficiently old history may need to be pruned and offloaded to cheaper
storage.

Conversely, a validator needs to store only the latest transactions on the
*frontier* of the object graph (e.g., txes with >0 unspent output objects).

## Fullnode setup
## Full node setup

Follow the instructions here to run your own Sui fullnode.
Follow the instructions here to run your own Sui full node.

### Hardware requirements

We recommend the following minimum hardware requirements for running a fullnode:
We recommend the following minimum hardware requirements for running a full node:

* CPUs: 2
* RAM: 8GB
* Storage: 50GB

Storage requirements will vary based on various factors (age of the chain,
transaction rate, etc) although we don't anticipate running a fullnode on
Devnet will require more than 50 GBs today given it is reset upon each
release roughly every two weeks.

### Software requirements

We recommend running Sui fullnodes on Linux. The Sui team supports the Ubuntu and
We recommend running Sui full nodes on Linux. The Sui team supports the Ubuntu and
Debian distributions and tests against
[Ubuntu version 18.04 (Bionic Beaver)](https://releases.ubuntu.com/18.04/).

That said, you are welcome to run a Sui fullnode on the operating system of your
That said, you are welcome to run a Sui full node on the operating system of your
choosing and submit changes to accommodate that environment. See [Install Sui](../build/install.md)
for setup instructions for each operating system.

Expand Down Expand Up @@ -113,16 +108,16 @@ If you are using Linux, install these extra dependencies. For example, in Ubuntu

If you are using macOS or Windows Subsystem for Linux (WSL), the command will be similar. Remember to install [CLang](https://clang.llvm.org/) in WSL.

## Configuring your fullnode
## Configure a full node

You may run a fullnode either by employing Docker or by building from
You may run a full node either by employing Docker or by building from
source.

### Using Docker Compose

Follow the instructions in the
[Fullnode Docker README](https://github.com/MystenLabs/sui/tree/main/docker/fullnode#readme)
to run a Sui fullnode using Docker, including [resetting the environment](https://github.com/MystenLabs/sui/tree/main/docker/fullnode#reset-the-environment).
[Full node Docker README](https://github.com/MystenLabs/sui/tree/main/docker/fullnode#readme)
to run a Sui full node using Docker, including [resetting the environment](https://github.com/MystenLabs/sui/tree/main/docker/fullnode#reset-the-environment).

### Building from source

Expand Down Expand Up @@ -154,7 +149,7 @@ issues building and installing the Sui binaries, update all packages above and r
```shell
$ git checkout --track upstream/devnet
```
1. Make a copy of the [fullnode configuration template](https://github.com/MystenLabs/sui/blob/main/crates/sui-config/data/fullnode-template.yaml):
1. Make a copy of the [full node configuration 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
```
Expand All @@ -168,8 +163,8 @@ issues building and installing the Sui binaries, update all packages above and r
1. Optional: You can skip this set of steps if you are willing to accept the default paths to
resources. If you need custom paths, edit your `fullnode.yaml` file to reflect the paths
you employ:
1. Update the `db-path` field with the path to where the fullnode's database
will be located. By default this will create the database in a directory
1. Update the `db-path` field with the path to where the full node's database
is located. By default this will create the database in a directory
`./suidb` relative to your current directory:
```yaml
db-path: "/path/to/suidb"
Expand All @@ -181,44 +176,41 @@ issues building and installing the Sui binaries, update all packages above and r
genesis:
genesis-file-location: "/path/to/genesis.blob"
```
1. Start your Sui fullnode:
1. Start your Sui full node:
```shell
$ cargo run --release --bin sui-node -- --config-path fullnode.yaml
```
1. Post build, receive the success confirmation message, `SuiNode started!`
1. Optional: [Publish / subscribe](pubsub.md) to notifications using JSON-RPC via websocket.

Your fullnode will now be serving the read endpoints of the [Sui JSON-RPC
Your full node will now be serving the read endpoints of the [Sui JSON-RPC
API](../build/json-rpc.md#sui-json-rpc-api) at:
`http://127.0.0.1:9000`

## Using the Explorer with your fullnode
## Using Sui Explorer with your full node

The [Sui Explorer](https://explorer.devnet.sui.io/) lets you configure where
[Sui Explorer](https://explorer.devnet.sui.io/) lets you configure where
it should issue read requests to query the blockchain. This enables you to
point the Explorer at your locally running fullnode and see the
point the Explorer at your locally running full node and see the
transactions it has synced from the network. To make this change:

1. Open a browser and go to: https://explorer.devnet.sui.io/
1. Click the **Devnet** button in the top right-hand corner of the Explorer and select
1. Click the **Devnet** button in the top right-hand corner of Sui Explorer and select
the *Local* network from the drop-down menu.
1. Close the *Choose a Network* menu to see the latest transactions.

The Explorer will now use your local fullnode to explore the state of the chain.
Sui Explorer now uses your local full node to explore the state of the chain.

## Monitoring

Monitor your fullnode using the instructions at [Logging, Tracing, Metrics, and
Monitor your full node using the instructions at [Logging, Tracing, Metrics, and
Observability](https://docs.sui.io/contribute/observability).

Note the default metrics port is 9184 yet configurable in your `fullnode.yaml` file.

## Updating your fullnode with new releases
## Updating your full node with new releases

Whenever a new release is deployed to `devnet`, the blockchain state is
typically wiped clean. In order to have your fullnode continue to properly
synchronize with the new state of Devnet, you'll need to follow a few steps
based on how you originally set up your node. See below.
Whenever Sui releases a new version, Devnet restarts as a new network with no data. You must update your full node with each Sui release to ensure compatibility with the network.

### With Docker Compose

Expand All @@ -230,10 +222,10 @@ $ docker-compose down --volumes

### Built from source

If you followed the instructions for [building from
Source](#building-from-source), update your fullnode as follows:
If you followed the instructions for [Building from
Source](#building-from-source), update your full node as follows:

1. Shut down your currently running fullnode.
1. Shut down your currently running full node.
1. `cd` into your local Sui repository:
```shell
$ cd sui
Expand All @@ -254,18 +246,18 @@ Source](#building-from-source), update your fullnode as follows:
[`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 fullnode:
1. Restart your Sui full node:
```shell
$ cargo run --release --bin sui-node -- --config-path fullnode.yaml
```
Your fullnode will once again be running at:
Your full node will once again be running at:
`http://127.0.0.1:9000`

## Future plans

Today, a fullnode relies only on synchronizing with 2f+1 validators in order to
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
fullnodes to fully participate in a peer-to-peer (p2p) environment where the
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
Expand Down
Loading