Actions

Mysten Node Deployment: Difference between revisions

From Chainlink Community Wiki

No edit summary
No edit summary
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
=Deploying a Mysten Mainnet Node=
==Install Dependencies==
==Install Dependencies==


=Install Rust and Cargo=
First we'll install some packages available in the standard repos
<code>sudo apt install curl wget git build-essential cmake tzdata ca-certificates libssl-dev pkg-config libclang-dev</code>
 
===Install Rust and Cargo===
 
<code>curl https://sh.rustup.rs -sSf | sh</code>
 
If successful, you should see the below:
<code>Rust is installed now. Great!</code>
 
Next, end your current TTY session and reconnect to reload your profile
 
Once you've reconnected we'll make sure we're running the latest stable release.
(we need to be at or above version 1.60.0)
<code> rustup update stable </code>
 
===Download and install the Sui binaries===
<code>cargo install --locked --git https://github.com/MystenLabs/sui.git --branch "devnet" sui</code>
 
 
==Fork and Clone the Mysten Sui Repo==
Navigate to https://github.com/MystenLabs/sui and click on the Fork button in the top-right
 
Once forked, we'll clone our repo
<code>https://github.com/$YOUR_GITHUB_USERNAME/sui.git</code>
 
Now, change into the newly downloaded directory.
<code>cd sui</code>
 
Then, set the original repo as a git remote.
<code>git remote add upstream https://github.com/MystenLabs/sui</code>
 
Sync with the remote repo, and checkout the `devnet` branch
<code>git fetch upstream && git checkout --track upstream/devnet</code>
 
Make a copy of the full node config file
<code>cp crates/sui-config/data/fullnode-template.yaml fullnode.yaml</code>
 
Create a hidden directory for your Sui database
<code>mkdir ~/.suidb</code>
 
And lastly, download the genesis state for devnet.
curl -fLJO https://github.com/MystenLabs/sui-genesis/raw/main/devnet/genesis.blob
 
Once we've accomplished the above, we want to update out fullnode.yaml file to make sure that it has the configurations applicable to our environment.
The below examples are assuming you followed this document.
*node:* Be sure to update the placeholder variables below.
 
<code>
db-path: "/home/$USERNAME/.suidb"
 
network-address: "/dns/localhost/tcp/8080/http"
metrics-address: "127.0.0.1:9184"
json-rpc-address: "$YOUR_LOCAL_IP:9000"
 
genesis:
  # Update this to the location of where the genesis file is stored
  genesis-file-location: "/home/$USERNAME/sui/genesis.blob"
</code>
 
Now that is all sorted, let's make certain that we're in the sui directory
<code>cd ~/sui</code>


curl https://sh.rustup.rs -sSf | sh
And then start our local full node.
<code>cargo run --release --bin sui-node -- --config-path /home/$USERNAME/sui/fullnode.yaml</code>

Latest revision as of 21:07, 27 June 2022

Deploying a Mysten Mainnet Node

Install Dependencies

First we'll install some packages available in the standard repos sudo apt install curl wget git build-essential cmake tzdata ca-certificates libssl-dev pkg-config libclang-dev

Install Rust and Cargo

curl https://sh.rustup.rs -sSf | sh

If successful, you should see the below: Rust is installed now. Great!

Next, end your current TTY session and reconnect to reload your profile

Once you've reconnected we'll make sure we're running the latest stable release. (we need to be at or above version 1.60.0) rustup update stable

Download and install the Sui binaries

cargo install --locked --git https://github.com/MystenLabs/sui.git --branch "devnet" sui


Fork and Clone the Mysten Sui Repo

Navigate to https://github.com/MystenLabs/sui and click on the Fork button in the top-right

Once forked, we'll clone our repo https://github.com/$YOUR_GITHUB_USERNAME/sui.git

Now, change into the newly downloaded directory. cd sui

Then, set the original repo as a git remote. git remote add upstream https://github.com/MystenLabs/sui

Sync with the remote repo, and checkout the `devnet` branch git fetch upstream && git checkout --track upstream/devnet

Make a copy of the full node config file cp crates/sui-config/data/fullnode-template.yaml fullnode.yaml

Create a hidden directory for your Sui database mkdir ~/.suidb

And lastly, download the genesis state for devnet. curl -fLJO https://github.com/MystenLabs/sui-genesis/raw/main/devnet/genesis.blob

Once we've accomplished the above, we want to update out fullnode.yaml file to make sure that it has the configurations applicable to our environment. The below examples are assuming you followed this document.

  • node:* Be sure to update the placeholder variables below.

db-path: "/home/$USERNAME/.suidb"

network-address: "/dns/localhost/tcp/8080/http" metrics-address: "127.0.0.1:9184" json-rpc-address: "$YOUR_LOCAL_IP:9000"

genesis:

 # Update this to the location of where the genesis file is stored
 genesis-file-location: "/home/$USERNAME/sui/genesis.blob"

Now that is all sorted, let's make certain that we're in the sui directory cd ~/sui

And then start our local full node. cargo run --release --bin sui-node -- --config-path /home/$USERNAME/sui/fullnode.yaml