Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Update document #956

Merged
merged 3 commits into from
Dec 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions DEV.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Developer instructions
# Instructions for developers working on solo project

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

Expand All @@ -11,7 +11,7 @@ Below we describe how you can set up local environment and contribute to `solo`.
* 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 -- <COMMAND> <ARGS>`
* Alternative way would be to run `npm run solo-test -- <COMMAND> <ARGS>`
* Run `npm test` or `npm run test` to run the unit tests
* Run `solo` to access the CLI.
* Note that debug logs are stored at `$HOME/.solo/logs/solo.log`.
Expand All @@ -23,6 +23,7 @@ Below we describe how you can set up local environment and contribute to `solo`.
* In order to run E2E test, we need to set up cluster and install the chart.
* Run `./test/e2e/setup-e2e.sh`
* Run `npm run test-e2e-standard`, NOTE: this excludes some E2E tests that have their own command
* You can check the section `scripts` in file `package.json` for more other test commands available.

* Tests are run in random order. The random seed value is shown as message such as:
`Using timestamp seed 1711414247085 for random test order`
Expand Down
18 changes: 13 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,17 @@ An opinionated CLI tool to deploy and manage standalone test networks.

## Requirements

| Solo Version | Node.js | Kind | Solo Chart | Hedera | Kubernetes | Kubectl | Helm | k9s | Docker Resources | Java |
|--------------|---------------------------|------------|-----------|----------|------------|------------|---------|------------|-------------------------|--------------|
| 0.29.0 | >= 20.14.0 (lts/hydrogen) | >= v1.29.1 | v0.30.0 | v0.53.0+ | >= v1.27.3 | >= v1.27.3 | v3.14.2 | >= v0.27.4 | Memory >= 8GB, CPU >= 4 | >= 21.0.1+12 |
| 0.30.0 | >= 20.14.0 (lts/hydrogen) | >= v1.29.1 | v0.30.0 | v0.54.0+ | >= v1.27.3 | >= v1.27.3 | v3.14.2 | >= v0.27.4 | Memory >= 8GB, CPU >= 4 | >= 21.0.1+12 |
| 0.31.4 | >= 20.18.0 (lts/iron) | >= v1.29.1 | v0.31.4 | v0.54.0+ | >= v1.27.3 | >= v1.27.3 | v3.14.2 | >= v0.27.4 | Memory >= 8GB, CPU >= 4 | >= 21.0.1+12 |
| Solo Version | Node.js | Kind | Solo Chart | Hedera | Kubernetes | Kubectl | Helm | k9s | Docker Resources |
|--------------|---------------------------|------------|------------|----------|------------|------------|---------|------------|-------------------------|
| 0.29.0 | >= 20.14.0 (lts/hydrogen) | >= v1.29.1 | v0.30.0 | v0.53.0+ | >= v1.27.3 | >= v1.27.3 | v3.14.2 | >= v0.27.4 | Memory >= 8GB, CPU >= 4 |
| 0.30.0 | >= 20.14.0 (lts/hydrogen) | >= v1.29.1 | v0.30.0 | v0.54.0+ | >= v1.27.3 | >= v1.27.3 | v3.14.2 | >= v0.27.4 | Memory >= 8GB, CPU >= 4 |
| 0.31.4 | >= 20.18.0 (lts/iron) | >= v1.29.1 | v0.31.4 | v0.54.0+ | >= v1.27.3 | >= v1.27.3 | v3.14.2 | >= v0.27.4 | Memory >= 8GB, CPU >= 4 |

### Hardware Requirements

To run a three-node network, you will need to set up Docker Desktop with at least 8GB of memory and 4 CPUs.

![alt text](/docs/content/User/DockerDesktop.png)

## Setup

Expand All @@ -35,6 +41,8 @@ nvm use lts/hydrogen

## Install Solo

* Run `npm clean install` or `npm ci`
* Run `npm run build`
* Run `npm install -g @hashgraph/solo`

## Documentation
Expand Down
44 changes: 44 additions & 0 deletions docs/content/User/Env.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
## Environment Variables Used in Solo

User can configure the following environment variables to customize the behavior of Solo.

### Table of environment variables

| Environment Variable | Description | Default Value |
|------------------------------------|--------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------|
| `SOLO_HOME` | Path to the Solo cache and log files | `~/.solo` |
| `SOLO_CHAIN_ID` | Chain id of solo network | `298` |
| `SOLO_NODE_ACCOUNT_ID_START` | First node account ID of solo test network | `0.0.3` |
| `SOLO_NODE_INTERNAL_GOSSIP_PORT` | Internal ossip port number used by hedera netwrok | `50111` |
| `SOLO_NODE_EXTERNAL_GOSSIP_PORT` | External port number used by hedera network | `50111` |
| `SOLO_NODE_DEFAULT_STAKE_AMOUNT` | Default stake amount for node | `500` |
| `SOLO_OPERATOR_ID` | Operator account ID for solo network | `0.0.2` |
| `SOLO_OPERATOR_KEY` | Operator private key for solo network | `302e020100300506032b65700422042091132178e72057a1d7528025956fe39b0b847f200ab59b2fdd367017f3087137` |
| `SOLO_OPERATOR_PUBLIC_KEY` | Operator public key for solo network | `302a300506032b65700321000aa8e21064c61eab86e2a9c164565b4e7a9a4146106e0a6cd03a8c395a110e92` |
| `FREEZE_ADMIN_ACCOUNT` | Freeze admin account ID for solo network | `0.0.58` |
| `GENESIS_KEY` | Genesis private key for solo network | `302e020100300506032b65700422042091132178e72057a1d7528025956fe39b0b847f200ab59b2fdd367017f3087137` |
| `LOCAL_NODE_START_PORT` | Local node start port for solo network | `30212` |
| `NODE_CLIENT_MIN_BACKOFF` | The minimum amount of time to wait between retries. | `1000` |
| `NODE_CLIENT_MAX_BACKOFF` | The maximum amount of time to wait between retries. | `1000` |
| `NODE_CLIENT_REQUEST_TIMEOUT` | The period of time a transaction or query request will retry from a "busy" network response | `600000` |
| `PODS_RUNNING_MAX_ATTEMPTS` | The maximum number of attempts to check if pods are running. | `900` |
| `PODS_RUNNING_DELAY` | The interval between attempts to check if pods are running, in the unit of milliseconds. | `1000` |
| `NETWORK_NODE_ACTIVE_MAX_ATTEMPTS` | The maximum number of attempts to check if network nodes are active. | `120` |
| `NETWORK_NODE_ACTIVE_DELAY` | The interval between attempts to check if network nodes are active, in the unit of milliseconds. | `1000` |
| `NETWORK_NODE_ACTIVE_TIMEOUT` | The period of time to wait for network nodes to become active, in the unit of milliseconds. | `60000` |
| `NETWORK_PROXY_MAX_ATTEMPTS` | The maximum number of attempts to check if network proxy is running. | `300` |
| `NETWORK_PROXY_DELAY` | The interval between attempts to check if network proxy is running, in the unit of milliseconds. | `2000` |
| `PODS_READY_MAX_ATTEMPTS` | The maximum number of attempts to check if pods are ready. | `300` |
| `PODS_READY_DELAY` | The interval between attempts to check if pods are ready, in the unit of milliseconds. | `2000` |
| `RELAY_PODS_RUNNING_MAX_ATTEMPTS` | The maximum number of attempts to check if relay pods are running. | `900` |
| `RELAY_PODS_RUNNING_DELAY` | The interval between attempts to check if relay pods are running, in the unit of milliseconds. | `1000` |
| `RELAY_PODS_READY_MAX_ATTEMPTS` | The maximum number of attempts to check if relay pods are ready. | `100` |
| `RELAY_PODS_READY_DELAY` | The interval between attempts to check if relay pods are ready, in the unit of milliseconds. | `120` |
| `NETWORK_DESTROY_WAIT_TIMEOUT` | The period of time to wait for network to be destroyed, in the unit of milliseconds. | `60000` |


Check notice on line 39 in docs/content/User/Env.md

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

docs/content/User/Env.md#L39

Expected: 1; Actual: 2





26 changes: 26 additions & 0 deletions docs/content/User/FAQ.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
### How can I avoid using genesis keys ?

You can run `solo account init` anytime after `solo node start`

### Where can I find the default account keys ?

It is the well known default genesis key [Link](https://github.com/hashgraph/hedera-services/blob/develop/hedera-node/data/onboard/GenesisPrivKey.txt)

### How do I get the key for an account?

Use the following command to get account balance and private key of the account `0.0.1007`:
```bash
# get account info of 0.0.1007 and also show the private key
solo account get --account-id 0.0.1007 -n solo-e2e --private-key
```

The output would be similar to the following:

```bash
{
"accountId": "0.0.1007",
"privateKey": "302e020100300506032b657004220420cfea706dd9ed2d3c1660ba98acf4fdb74d247cce289ef6ef47486e055e0b9508",
"publicKey": "302a300506032b65700321001d8978e647aca1195c54a4d3d5dc469b95666de14e9b6edde8ed337917b96013",
"balance": 100
}
```
6 changes: 5 additions & 1 deletion docs/content/User/GetStarted.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## Table of Contents

Quick start::
Quick start:

* [Start solo network with single command](TaskTool.md)

Expand All @@ -18,6 +18,10 @@

* [Using Solo with mirror node](SoloWithMirrorNode.md)
* [Access Hedera Network Services](AccessHederaServices.md)
* [Using Environment Variables](Env.md)

FAQ:
* [Frequently Asked Questions](FAQ.md)

Check notice on line 24 in docs/content/User/GetStarted.md

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

docs/content/User/GetStarted.md#L24

Lists should be surrounded by blank lines

For curious mind:

Expand Down
4 changes: 3 additions & 1 deletion docs/content/User/SoloWithMirrorNode.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ kubectl port-forward svc/hedera-explorer -n "${SOLO_NAMESPACE}" 8080:80 > /dev/n

Then you can access the hedera explorer at `http://localhost:8080`

You can try to create a few accounts with solo and see the transactions in the explorer.
Or you can use Task tool to deploy solo network with mirror node with a single command [link](TaskTool.md)

Next, you can try to create a few accounts with solo and see the transactions in the explorer.

```bash
solo account create -n solo-e2e --hbar-amount 100
Expand Down
2 changes: 2 additions & 0 deletions docs/content/User/TaskTool.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@
task default-with-relay
```

If mirror node or relay node is deployed, user can access the hedera explorer at http://localhost:8080

Check notice on line 32 in docs/content/User/TaskTool.md

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

docs/content/User/TaskTool.md#L32

Bare URL used

### Stop solo network

To tear down the solo network
Expand Down
4 changes: 4 additions & 0 deletions docs/data/menu/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ main:
ref: "/User/SoloWithMirrorNode.md"
- name: Access Hedera Network services
ref: "/User/AccessHederaServices.md"
- name: "Using Environment Variables"
ref: "/User/Env.md"
- name: FAQ
ref: "/User/FAQ.md"
- name: Step-by-step guide
ref: "/User/StepByStepGuide.md"
- name: Solo CLI manual
Expand Down
Loading