Examples

The examples section provides information on some examples of how Solo can be used and leveraged.

The usage of examples in Solo

Table of Contents

Example DirectoryDescription
address-bookExample of using Yahcli to pull the ledger and mirror node address book
multicluster-backup-restoreMulti-cluster backup/restore workflow with external PostgreSQL database and distributed consensus nodes
custom-network-configDeploy a Solo network with custom configuration settings (log4j2, properties, etc.)
external-database-testDeploy a Solo network with an external PostgreSQL database
hardhat-with-soloExample of using Hardhat to test a smart contract with a local Solo deployment
local-build-with-custom-configExample of how to create and manage a custom Hiero Hashgraph Solo deployment using locally built consensus nodes
network-with-block-nodeDeploy a Solo network that includes a block node
network-with-domain-namesSetup a network using custom domain names for all components
node-create-transactionManually write a NodeCreateTransaction and use the add-prepare/prepare-upgrade/freeze-upgrade/add-execute commands.
node-delete-transactionManually write a NodeDeleteTransaction and use the add-prepare/prepare-upgrade/freeze-upgrade/add-execute commands.
node-update-transactionManually write a NodeUpdateTransaction and use the add-prepare/prepare-upgrade/freeze-upgrade/add-execute commands.
one-shot-falconExample of how to use the Solo one-shot falcon commands
rapid-fireExample of how to use the Solo rapid-fire commands
state-save-and-restoreSave network state, recreate network, and restore state with mirror node (with optional external database)
version-upgrade-testExample of how to upgrade all components of a Hiero network to current versions

Accessing Examples

From GitHub Repository

All examples are available in the examples directory of the Solo repository. You can browse the source code, documentation, and configuration files directly on GitHub.

Downloading Example Archives

Pre-packaged example archives are available for download from the Solo releases page. Each example is packaged as a standalone zip file that includes all necessary configuration files and documentation.

To download a specific example:

  1. Visit the Solo releases page
  2. Navigate to the desired release version
  3. Download the example archive (e.g., example-backup-restore-workflow.zip)

Example download URL format:

https://github.com/hiero-ledger/solo/releases/download/<release_version>/example-<example-name>.zip

For example, to download the backup-restore-workflow example from release v0.49.0:

https://github.com/hiero-ledger/solo/releases/download/v0.49.0/example-backup-restore-workflow.zip

After downloading, extract the archive and follow the README instructions inside.

Prerequisites

  • install taskfile: npm install -g @go-task/cli

Running the examples with Taskfile

  • cd into the directory under examples that has the Taskfile.yml, e.g. (from solo repo root directory) cd examples/network-with-block-node/
  • make sure that your current kubeconfig context is pointing to the cluster that you want to deploy to
  • run task which will do the rest and deploy the network and take care of many of the pre-requisites

NOTES:

  • Some of these examples are for running against large clusters with a lot of resources available.
  • Edit the values of the variables as needed.

Customizing the examples

  • take a look at the Taskfile.yml sitting in the subdirectory for the deployment you want to run
  • make sure your cluster can handle the number in SOLO_NETWORK_SIZE, if not, then you will have to update that and make it match the number of nodes in the init-containers-values.yaml: hedera.nodes[]
  • take a look at the init-containers-values.yaml file and make sure the values are correct for your deployment with special attention to:
    • resources
    • nodeSelector
    • tolerations

Address Book Example

Example of how to use Yahcli to read/update ledger and mirror node address book

Custom Network Config Example

Example of how to create and manage a custom Solo deployment and configure it with custom settings

Local Build with Custom Config Example

Example of how to create and manage a custom Hiero Hashgraph Solo deployment using locally built consensus nodes with custom configuration settings

Multi-Cluster Backup and Restore Example

Example demonstrating multi-cluster backup and restore workflow with external PostgreSQL database

Network with an External PostgreSQL Database Example

example of how to deploy a Solo network with an external PostgreSQL database

Network with Block Node Example

Example of how to create and manage a custom Solo deployment and configure it with custom settings

Network With Domain Names Example

Example of how to deploy a Solo network with custom domain names

Node Create Transaction Example

Using Solo with a custom NodeCreateTransaction from an SDK call

Node Delete Transaction Example

Using Solo with a custom NodeDeleteTransaction from an SDK call

Node Update Transaction Example

Using Solo with a custom NodeUpdateTransaction from an SDK call

One-Shot Falcon Deployment Example

Example of how to use the Solo one-shot falcon commands.

Rapid-Fire Example

Example of how to use the Solo rapid-fire commands.

Solo deployment with Hardhat Example

example of how to deploy a Solo network and run Hardhat tests against it

State Save and Restore Example

Example of how to save network state and restore it later

Version Upgrade Test Example

Example of how to upgrade all components of a Hedera network to current versions