Vara Node
This guide covers the steps required to install and run the Vara node.
Introduction
There are two ways to get started with the Vara node. First, download a pre-built binary file and run it. Second, compile the binary file and configure it manually. Using a ready-made build is a quick and convenient way to get started, as it skips the installation of Rust and all its dependencies and the node compiling process. Compiling the node from scratch may take about twenty minutes or more, depending on hardware.
System Requirements
• CPU: 2 vCPUs @ ~3.4 GHz (Intel Ice Lake or equivalent) • Memory: 8 GB RAM • Storage: 80 GB SSD
Install with Pre-built Binary
Depending on the operating system, download the latest release build of the node from https://get.gear.rs:
Terminal:
curl https://get.gear.rs/gear-v1.2.1-x86_64-unknown-linux-gnu.tar.xz | tar xJor
Linux x86-64: gear-v1.2.1-x86_64-unknown-linux-gnu.tar.xz
Run the node:
./gear --version
gear 1.2.1-a218853Terminal:
curl https://get.gear.rs/gear-v1.2.1-aarch64-apple-darwin.tar.xz | tar xJor
macOS ARM: gear-v1.2.1-aarch64-apple-darwin.tar.xz
Run the node:
./gear --version
gear 1.2.1-a218853Terminal:
curl https://get.gear.rs/gear-v1.2.1-x86_64-apple-darwin.tar.xz | tar xJor
macOS x86-64: gear-v1.2.1-x86_64-apple-darwin.tar.xz
Run the node:
./gear --version
gear 1.2.1-a218853Terminal:
curl -O https://get.gear.rs/gear-v1.2.1-x86_64-pc-windows-msvc.zipor
Windows x86-64: gear-v1.2.1-x86_64-pc-windows-msvc.zip
Unzip the downloaded package, then run the node:
gear.exe --version
gear.exe 1.2.1-a218853Need the Latest Features?
If you require cutting-edge functionality before it hits the stable release, you can use our nightly builds.
Note: Nightly versions may be less stable than official releases.
Compile Node Manually
Compiling the build will take some time and requires the installation of some dependencies.
Windows Compatibility
- Windows users often face issues with Rust dependencies and build tools.
- We strongly recommend using Linux or macOS for compiling Vara nodes and programs.
Tip: If you are on Windows, using WSL2 (Windows Subsystem for Linux) is the best way to ensure a stable development environment.
Prerequisites
Linux users should generally install GCC and Clang, according to their distribution’s documentation. Additionally, the binaryen toolset, which contains the required wasm-opt tool, should be installed.
For example, on Ubuntu use:
sudo apt install -y clang build-essential binaryen cmake protobuf-compilerOn macOS, get a compiler toolset and binaryen by running:
xcode-select --install
brew install binaryenInstall Rust
If Rust is already installed, skip this step.
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | shReboot the terminal after installation.
Install Wasm Toolchains
rustup toolchain add nightly
rustup target add wasm32-unknown-unknown --toolchain nightlyClone Gear Repository
git clone https://github.com/gear-tech/gear.git
cd gear
# Checkout to the latest release tag
git checkout v1.2.1 -b release-1.2.1Using the Master Branch
To access the latest or experimental Gear Protocol functions, compile the node from the master branch.
If you have switched to another branch, you can return to master using:
git checkout masterCompile
cargo build -p gear-cli --releaseor
make node-releaseBuild Output Location
The compiled binary is located at: target/release/gear
To navigate to the output folder, run:
cd target/releaseRun Vara Node
Starting the Node
Regardless of how you obtained the binary, navigate to its directory and run the node to connect to the Vara Testnet:
./gearTo run the Vara node in dev mode:
./gear --devCommand Flags and Options
gear [subcommand] [options]-
--chain=testnetConnect the node to the test network (default option).
-
--chain=varaConnect the node to the Vara network.
-
--devRun a local node in development mode for testing purposes. This node will not be connected to any external network and will store the state in temporary storage.
-
purge-chainRemove storage of the selected chain type. Specify the chain connection type
--chain=testnet,--chain=vara, or--dev. -
help,--helpPrint the available subcommands/options or the help of the given subcommand.
Special Environment Variables
To run the Vara node with logs from contracts:
RUST_LOG="gwasm=debug" gear [subcommand] [options]