Skip to content

Commit

Permalink
Edit latest additions to fullnode doc (MystenLabs#2464)
Browse files Browse the repository at this point in the history
* Edit latest additions to fullnode doc

* Finish edits to latest additions

* Fix GitHub capitalization
  • Loading branch information
Clay-Mysten authored Jun 7, 2022
1 parent f1c82de commit 6bded91
Showing 1 changed file with 37 additions and 38 deletions.
75 changes: 37 additions & 38 deletions doc/src/build/fullnode.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ Today this synchronization process is performed by:
Today 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
new transactions. Overtime we will improve this process (e.g. with the
introduction of a checkpoints, ability to synchronize with other fullnodes,
introduction of checkpoints, ability to synchronize with other fullnodes,
etc) in order to have better guarantees around a fullnode’s ability to be
confident it has seen all recent transactions.

Expand All @@ -59,7 +59,7 @@ validator nodes, fullnodes 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,
Today, a fullnode is expected to maintain the full history of the chain,
although in the future sufficiently old history may need to be pruned and
offloaded to cheaper storage.

Expand All @@ -70,7 +70,7 @@ Conversely, a validator needs to store only the latest transactions on the

Follow the instructions here to run your own Sui fullnode.

### Hardware Requirements
### Hardware requirements

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

Expand All @@ -82,42 +82,42 @@ transaction rate, etc) although we don't anticipate running a fullnode on
devnet will require more than a handful of GBs given it is reset upon each
release roughly every two weeks.

## Configuring your Fullnode
## Configuring your fullnode

Today the only supported way of running a fullnode requires building from
source. In the future we plan on providing Docker images for more flexibility
Currently, the only supported way of running a fullnode requires building from
source. In the future, we plan on providing Docker images for more flexibility
in how a fullnode is run.

### Building from Source
### Building from source

0. *Prerequisite* Before beginning ensure that the following tools are
installed in your environment:
- Rust toolchain managed by [rustup](https://rustup.rs/)
- `git`
- `cmake`

1. Setup your fork of the Sui repository.
- Go to the [Sui repository](https://github.com/MystenLabs/sui) on Github
1. Set up your fork of the Sui repository:
- Go to the [Sui repository](https://github.com/MystenLabs/sui) on GitHub
and click the *Fork* button in the top right-hand corner of the screen.
- Clone your personal fork of the Sui repository to your local machine
(ensure that you insert your Github username into the URL):
(ensure that you insert your GitHub username into the URL):
```
$ git clone https://github.com/<YOUR GITHUB USERNAME>/sui.git
```
2. `cd` into your `sui` repository.
2. `cd` into your `sui` repository:
```
$ cd sui
```
3. Setup the Sui repository as a git remote
3. Set up the Sui repository as a git remote:
```
$ git remote add upstream https://github.com/MystenLabs/sui
$ git fetch upstream
```
4. Checkout the devnet branch
4. Check out the 'devnet' branch:
```
$ git checkout --track upstream/devnet
```
5. Make a copy of the fullnode configuration template
5. Make a copy of the fullnode configuration template:
```
$ cp crates/sui-config/data/fullnode-template.yaml fullnode.yaml
```
Expand All @@ -128,7 +128,7 @@ in how a fullnode is run.
```
$ curl -fO https://github.com/MystenLabs/sui-genesis/raw/main/devnet/genesis.blob
```
7. Edit your `fullnode.yaml` file
7. Edit your `fullnode.yaml` file:
- Update the `db-path` field with a path to where the fullnode's database
will be located. By default this will create the database in a directory
`./suidb` relative to your current directory:
Expand All @@ -142,56 +142,55 @@ in how a fullnode is run.
genesis:
genesis-file-location: "/path/to/genesis.blob"
```
8. Start your Sui fullnode
8. Start your Sui fullnode:
```
$ cargo run --release --bin sui-node -- --config-path fullnode.yaml
```
Your fullnode will now be serving the read endpoints of the [Sui JSON-RPC
API](https://docs.sui.io/build/json-rpc#sui-json-rpc-api) at
API](../build/json-rpc.md#sui-json-rpc-api) at
`http://127.0.0.1:9000`.
## Using the Explorer with your Fullnode
## Using the Explorer with your fullnode
The [Sui Explorer](https://explorer.devnet.sui.io/) supports configuring where
it should issue read requests to query the blockchain. This enables you to
point the explorer at your locally running fullnode and explore the
transactions that it has synced from the network. You can do this by:
1. Open a browser and go to https://explorer.devnet.sui.io/
2. Select the button in the top right-hand corner of the page and select
1. Open a browser and go to: https://explorer.devnet.sui.io/
2. Click the button in the top right-hand corner of the page and select
`Local` from the drop-down menu.
The explorer will now be using your local fullnode to explore the state of the chain.
The Explorer will now be using your local fullnode to explore the state of the chain.
## Monitoring
Monitor your fullnode using the instructions at [Logging, Tracing, Metrics, and
Observability](https://docs.sui.io/contribute/observability).
## Updating your Fullnode with New Releases
## Updating your fullnode with new releases
Whenever a new release is deployed to `devnet` the blockchain state is
generally wiped. 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 setup your node.
Whenever a new release is deployed to `devnet`, the blockchain state is
generally 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.
### Built from Source
### Built from source
If you followed the [Building from
Source](#markdown-header-building-from-source) directions you can do the
following to update:
Source](#markdown-header-building-from-source) directions, update as follows:
1. Shutdown your currently running fullnode.
2. `cd` into where your local Sui repository is.
1. Shut down your currently running fullnode.
2. `cd` into your local Sui repository:
```
$ cd sui
```
3. Remove the old on-disk database and genesis.blob file
3. Remove the old on-disk database and 'genesis.blob' file:
```
$ rm -r suidb genesis.blob
```
4. Fetch the source from the latest release.
4. Fetch the source from the latest release:
```
$ git fetch upstream
$ git checkout -B devnet --track upstream/devnet
Expand All @@ -200,17 +199,17 @@ following to update:
[`genesis`](https://github.com/MystenLabs/sui-genesis/raw/main/devnet/genesis.blob)
state for devnet.
6. Update your `fullnode.yaml` configuration file if needed.
7. Start your Sui fullnode
7. Start your Sui fullnode:
```
$ cargo run --release --bin sui-node -- --config-path fullnode.yaml
```
## Future plans
Today a fullnode only relies on synchronizing with 2f+1 validators in order to
ensure that it has seen all committed transactions. In the future we expect
Today, a fullnode relies only on synchronizing with 2f+1 validators in order to
ensure that it has seen all committed transactions. In the future, we expect
fullnodes 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 have the burden be solely on the validators. We also expect future
features, like checkpoints, to enable improved performance of synchronizing the
state of the chain from genesis.
features, such as checkpoints, to enable improved performance of synchronizing the
state of the chain from genesis.

0 comments on commit 6bded91

Please sign in to comment.