Prerequisites:

  1. Install Rust: Versatus is written in Rust, so ensure you have Rust installed. You can install it by running:

    curl --proto '=https' --tlsv1.2 -sSf <https://sh.rustup.rs> | sh
    
    

    After installation, run the following command to ensure Rust is set up correctly:

    rustc --version
    
    
  2. Install dependencies: Depending on your OS, you might need to install some additional libraries. On Debian/Ubuntu-based systems, you can run:

    sudo apt-get update
    sudo apt-get install build-essential libssl-dev pkg-config
    
    
  3. Clone the Versatus repository: Get the latest version of the code by cloning the official GitHub repo:

    git clone <https://github.com/versatus/versatus>
    cd versatus
    
    

Building and Running the Node:

  1. Build the Versatus node: To build the node in release mode, which is optimized for production, use the following command:

    cargo build --release
    
    

    This will compile the node and generate a binary located in the target/release directory.

  2. Start the Node: Once the build is complete, you can start the Versatus node by running the following:

    ./target/release/versatus
    
    

    To see the available CLI options and configurations for running your node, execute:

    ./target/release/versatus --help
    
    

Configuration:

Running in Debug Mode (optional):

If you're working in a development environment and want faster builds with more debug information, you can use the following command:

cargo run

This will build and run the node in debug mode, though it's slower than release mode.