This is the multi-page printable view of this section. Click here to print.

Return to the regular view of this page.

Development

The development section provides information on how to set up a local development environment for the Solo network, including instructions for building and running the Solo node, as well as using the Solo CLI.

The development section provides information on how to set up a local development environment for the Solo network, including instructions for building and running the Solo node, as well as using the Solo CLI.

1 - Contributing to Solo

Instructions for developers working on the Solo project

Instructions for developers working on solo project

Below we describe how you can set up a local environment and contribute to solo.

  • Clone the repo
  • In order to support ES6 modules with jest, set an env variable NODE_OPTIONS as below:
    • export NODE_OPTIONS=--experimental-vm-modules >> ~/.zshrc
  • For Intellij users: enable --experimental-vm-modules for Jest as below:
    • Go to: Run->Edit Configurations->Edit Configuration Templates->Jest
    • Set: --experimental-vm-modules in Node Options.
  • Run npm i to install the required packages
  • Run npm link to install solo as the CLI
    • Note: you need to do it once. If solo already exists in your path, you will need to remove it first.
    • Alternative way would be to run npm run solo-test -- <COMMAND> <ARGS>
  • Run task test to run the unit tests
  • Run solo to access the CLI.
  • Note that debug logs are stored at $HOME/.solo/logs/solo.log.
    • So you may use tail -f $HOME/.solo/logs/solo.log | jq in a separate terminal to keep an eye on the logs.
  • Before making a commit run task format

E2E tests

  • In order to run E2E test, we need to set up a cluster and install the chart.
    • Run task test-setup
    • Run task test-e2e-standard, NOTE: this excludes some E2E tests that have their own command
    • You can check the command task --list-all for more other test commands available.

2 - Using 'Task' to Launch Solo

This page describes how to use the Task tool to quickly deploy a standalone Hiero Consensus Node network using Solo CLI. It provides a simple command-line interface for developers to set up and manage their Solo network.

Use the Task tool to Launch Solo

For developers who want to quickly deploy a standalone Hiero Consensus Node network without needing to know what is under the hood, they can use the Task tool to launch the network with a single command.

NOTE: this requires cloning the GitHub repository: https://github.com/hiero-ledger/solo

First, install the cluster tool kind with this link

Then, install the task tool task with this link

task will install dependencies and build the solo project.

Start the Hiero Consensus Node network

Developer can use one of the following three commands to quickly deploy a standalone Hiero Consensus Node network.

# Option 1) deploy the network with two nodes `task` is the same as `task default`
task

# Option 2) deploy the network with two nodes, and a Mirror Node
cd examples
task default-with-mirror

# Option 3) deploy the network with two nodes, a Mirror Node, and a JSON RPC Relay
cd examples
task default-with-relay

If a Mirror Node or a Relay node is deployed, the user can access the Hiero Explorer at http://localhost:8080

Stop the Consensus Node network

To tear down the network:

task clean

3 - Contributing to Hiero Projects

4 - Solo API Reference

The API reference for the Solo application, including all methods and properties. This is a work in progress and will be updated as the API evolves.

Solo API Reference

The API reference for the Solo application, including all methods and properties.