-
Notifications
You must be signed in to change notification settings - Fork 455
docs: add supernova to the docs
#5052
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
Merged
Merged
Changes from 10 commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
aafaa6c
docs: add supernova explanation
davd-gzl 73d9d1b
docs: make generate
davd-gzl a81e574
fix: siplify bullet list to tab
davd-gzl dc43a5e
feat: V2 supernova documentation
davd-gzl be50252
docs: simplify usage
davd-gzl 9549aa9
docs: resentence README description
davd-gzl 10b1ada
lint: 80 cols + escape character
davd-gzl 6d69606
Update docs/builders/stress-testing-with-supernova.md
davd-gzl 7eed402
Update docs/builders/stress-testing-with-supernova.md
davd-gzl f68d582
docs: update Go version requirement and add note on mnemonic usage
davd-gzl 0acf490
Update docs/builders/stress-testing-with-supernova.md
thehowl File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,154 @@ | ||
| # Stress Testing with Supernova | ||
|
|
||
| ## What is Supernova? | ||
|
|
||
| [Supernova](https://github.com/gnolang/supernova) is a stress-testing | ||
| tool designed specifically for Gno TM2 networks. It helps node operators | ||
| and developers understand how their network behaves under load by | ||
| simulating realistic transaction patterns and measuring performance | ||
| metrics. | ||
|
|
||
| ## Why Stress Test Your Network? | ||
|
|
||
| Stress testing answers critical questions before production deployment: | ||
|
|
||
| | Question | Why It Matters | | ||
| |----------|----------------| | ||
| | What's my maximum TPS? | Know when performance will degrade under load | | ||
| | How do gas limits affect throughput? | Optimize block parameters | | ||
| | Where are the bottlenecks? | Find issues in consensus, storage, or network | | ||
| | How do workloads differ? | Plan capacity for deployments vs calls | | ||
|
|
||
| ## How Supernova Works | ||
|
|
||
| Supernova operates in three phases: | ||
|
|
||
| ### 1. Account Setup | ||
|
|
||
| Supernova derives multiple subaccounts from a single mnemonic. This simulates | ||
| realistic conditions where transactions come from many different addresses, | ||
| testing the network's ability to handle concurrent account state updates. | ||
|
|
||
| The tool automatically distributes funds from the main account (index 0) to | ||
| all subaccounts before the test begins. | ||
|
|
||
| ### 2. Transaction Generation | ||
|
|
||
| Based on the selected mode, supernova constructs and signs transactions. | ||
|
|
||
| ## Stress Testing Modes | ||
|
|
||
| | Mode | What it Does | Best For | | ||
| |------|--------------|----------| | ||
| | REALM_DEPLOYMENT | Deploys a new realm per tx | Heavy workloads | | ||
| | PACKAGE_DEPLOYMENT | Deploys pure packages | Code storage | | ||
| | REALM_CALL | Deploys realm, calls methods | Production | | ||
|
|
||
| For most production scenarios, REALM_CALL provides the most relevant metrics | ||
| since it simulates typical user interactions. | ||
|
|
||
| ### 3. Result Collection | ||
|
|
||
| After broadcasting transactions, supernova monitors the blockchain to collect | ||
| metrics like TPS, block utilization, and gas consumption. | ||
|
|
||
| ## Understanding the Results | ||
|
|
||
| ### TPS (Transactions Per Second) | ||
|
|
||
| TPS reflects real-world throughput, accounting for: | ||
| - Transaction propagation time | ||
| - Block production intervals | ||
| - Consensus overhead | ||
|
|
||
| A higher TPS indicates better network performance, but the optimal value | ||
| depends on your hardware, network configuration, and block parameters. | ||
|
|
||
| ### Block Utilization | ||
|
|
||
| Block utilization reveals how efficiently blocks are being filled: | ||
|
|
||
| - **Low utilization (\<50%)**: The network has spare capacity. Transaction | ||
| volume is below what the network can handle. | ||
| - **High utilization (\>80%)**: The network is near capacity. Consider | ||
| increasing gas limits or optimizing transaction costs. | ||
| - **Variable utilization**: May indicate inconsistent transaction batching or | ||
| network congestion patterns. | ||
|
|
||
| ## When to Use Supernova | ||
|
|
||
| - **Before deployment**: Validate your network can handle expected load | ||
| - **After configuration changes**: Verify block gas limits, timing parameters | ||
| - **During capacity planning**: Determine hardware requirements for target TPS | ||
| - **Comparing node implementations**: Benchmark different setups objectively | ||
|
|
||
| ## Integration with Monitoring | ||
|
|
||
| For deeper insights, run supernova against a node with | ||
| [OpenTelemetry enabled](../../misc/telemetry/README.md). This allows you to | ||
| correlate supernova's transaction metrics with internal node metrics like: | ||
|
|
||
| - Memory and CPU usage during load | ||
| - Consensus round timing | ||
| - Storage I/O patterns | ||
| - Network message latency | ||
|
|
||
| ## Getting Started | ||
|
|
||
| ### Prerequisites | ||
|
|
||
| - Go (see `go.mod` for the minimum version) | ||
| - A running Gno node (e.g., via `gnodev` or `gnoland start`) | ||
| - A funded mnemonic (the first derived address needs funds for distribution) | ||
|
|
||
| ### Installation | ||
|
|
||
| ```bash | ||
| # Clone the repository | ||
| git clone https://github.com/gnolang/supernova.git | ||
| cd supernova | ||
|
|
||
| # Build the binary | ||
| make build | ||
|
|
||
| # The binary will be at ./build/supernova | ||
| ``` | ||
|
|
||
| ### Basic Usage | ||
|
|
||
| ```bash | ||
| ./build/supernova \ | ||
| -url http://localhost:26657 \ | ||
| -mnemonic "source bonus chronic canvas draft south burst lottery \ | ||
|
thehowl marked this conversation as resolved.
|
||
| vacant surface solve popular case indicate oppose farm nothing bullet \ | ||
| exhibit title speed wink action roast" \ | ||
| -sub-accounts 5 \ | ||
| -transactions 100 \ | ||
| -mode REALM_CALL \ | ||
| -output results.json | ||
| ``` | ||
|
|
||
| You can check the results in `results.json`. For production-grade | ||
| testing, increase `-sub-accounts` (50-100) and `-transactions` (5000+). | ||
|
|
||
| **Note:** The mnemonic above corresponds to `test1`, which is a pre-registered | ||
| and funded account on default deployments of gno.land (e.g., when using | ||
| `gnodev` or local testnets). | ||
|
|
||
| ### CLI Flags | ||
|
|
||
| | Flag | Default | Description | | ||
| |------|---------|-------------| | ||
| | `-url` | (required) | JSON-RPC URL of the Gno node | | ||
| | `-mnemonic` | (required) | Mnemonic for deriving accounts | | ||
| | `-sub-accounts` | 10 | Number of accounts sending transactions | | ||
| | `-transactions` | 100 | Total transactions to send | | ||
| | `-mode` | REALM_DEPLOYMENT | Transaction mode (see Modes section) | | ||
| | `-batch` | 100 | Batch size for JSON-RPC calls | | ||
| | `-chain-id` | dev | Chain ID of the network | | ||
| | `-output` | (none) | Path to save results JSON | | ||
|
|
||
| ### Resources | ||
|
|
||
| - [Supernova GitHub repository](https://github.com/gnolang/supernova) | ||
| - [Benchmark reports](https://github.com/gnolang/benchmarks/tree/main/reports/supernova) | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.