Skip to content

Commit 3ad607e

Browse files
authored
feat: nodes chart (#8)
- Updated biome.jsonc to include linter rules for suspicious code. - Adjusted package.json to ensure consistent command execution. - Enhanced README.md with additional options for CLI commands. - Modified .vscode/settings.json to enforce formatting on save and paste. - Updated Helm chart files for network-bootstrapper, including values and templates for deployment. - Refined test cases in build-command.test.ts and output.test.ts to align with new configurations. ## Summary by Sourcery Add a new ‘network-nodes’ Helm chart and update the CLI to use a dedicated generate subcommand while removing RPC node support, and adjust scripts, tests, and documentation accordingly. New Features: - Add a generate subcommand to the CLI and remove the RPC node count option from the root command - Introduce a new umbrella Helm chart “network” that includes “network-bootstrapper” and a new “network-nodes” chart for deploying validator and RPC StatefulSets Enhancements: - Refactor the CLI build command and output module to drop RPC node handling and streamline spec generation - Update package.json helm and packaging scripts to point at the new chart names and paths Build: - Add biome.jsonc linter rules and .vscode settings to enforce formatting on save Documentation: - Revise README.md to reflect the new CLI command structure and document the umbrella and nodes charts Tests: - Adjust unit tests for the CLI and output modules to remove RPC node expectations and target the generate subcommand - Add Helm test hooks and templates in the network-nodes chart
1 parent 8308a5e commit 3ad607e

42 files changed

Lines changed: 2256 additions & 301 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,4 @@ report.[0-9]_.[0-9]_.[0-9]_.[0-9]_.json
3232

3333
# Finder (MacOS) folder config
3434
.DS_Store
35+
Chart.lock

.vscode/settings.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
"editor.defaultFormatter": "biomejs.biome"
2626
},
2727
"typescript.tsdk": "node_modules/typescript/lib",
28+
"prettier.enable": false,
2829
"editor.formatOnSave": true,
2930
"editor.formatOnPaste": true,
3031
"emmet.showExpandedAbbreviation": "never",

README.md

Lines changed: 8 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -9,30 +9,15 @@ The helm chart to run this on Kubernetes / OpenShift can be found [here](./chart
99
## CLI usage
1010

1111
```
12-
Usage: network-bootstrapper [options]
12+
Usage: network-bootstrapper [options] [command]
1313
14-
Generate node identities, configure consensus, and emit a Besu genesis.
14+
Utilities for configuring Besu-based networks.
1515
1616
Options:
17-
-v, --validators <count> Number of validator nodes to generate.
18-
(default: 4)
19-
-r, --rpc-nodes <count> Number of RPC nodes to generate. (default: 2)
20-
-a, --allocations <file> Path to a genesis allocations JSON file.
21-
(default: none)
22-
-o, --outputType <type> Output target (screen, file, kubernetes).
23-
(default: "screen")
24-
--consensus <algorithm> Consensus algorithm (IBFTv2, QBFT). (default:
25-
QBFT)
26-
--chain-id <number> Chain ID for the genesis config. (default:
27-
random between 40000 and 50000)
28-
--seconds-per-block <number> Block time in seconds. (default: 2)
29-
--gas-limit <decimal> Block gas limit in decimal form. (default:
30-
9007199254740991)
31-
--gas-price <number> Base gas price (wei). (default: 0)
32-
--evm-stack-size <number> EVM stack size limit. (default: 2048)
33-
--contract-size-limit <number> Contract size limit in bytes. (default:
34-
2147483647)
35-
--accept-defaults Accept default values for all prompts when CLI
36-
flags are omitted. (default: disabled)
37-
-h, --help display help for command
17+
-h, --help display help for command
18+
19+
Commands:
20+
generate [options] Generate node identities, configure consensus, and emit a
21+
Besu genesis.
22+
help [command] display help for command
3823
```

biome.jsonc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
{
22
"$schema": "./node_modules/@biomejs/biome/configuration_schema.json",
33
"extends": ["ultracite"],
4+
"files": {
5+
"includes": ["**", "!**/*.yaml"]
6+
},
47
"linter": {
58
"rules": {
69
"suspicious": {

charts/network-bootstrapper/README.md

Lines changed: 0 additions & 52 deletions
This file was deleted.

charts/network-bootstrapper/values.yaml

Lines changed: 0 additions & 113 deletions
This file was deleted.

charts/network/Chart.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
apiVersion: v2
2+
name: network
3+
description: A Helm chart for a blockchain network on Kubernetes
4+
type: application
5+
version: 0.1.0
6+
appVersion: "0.1.0"
7+
maintainers:
8+
- name: SettleMint
9+
email: support@settlemint.com
10+
url: https://settlemint.com
11+
dependencies:
12+
- name: network-bootstrapper
13+
version: "*"
14+
- name: network-nodes
15+
version: "*"

charts/network/README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# network
2+
3+
![Version: 0.1.0](https://img.shields.io/badge/Version-0.1.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.1.0](https://img.shields.io/badge/AppVersion-0.1.0-informational?style=flat-square)
4+
5+
A Helm chart for a blockchain network on Kubernetes
6+
7+
## Maintainers
8+
9+
| Name | Email | Url |
10+
| ---- | ------ | --- |
11+
| SettleMint | <support@settlemint.com> | <https://settlemint.com> |
12+
13+
## Requirements
14+
15+
| Repository | Name | Version |
16+
|------------|------|---------|
17+
| | network-bootstrapper | * |
18+
| | network-nodes | * |
19+
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Patterns to ignore when building packages.
2+
# This supports shell glob matching, relative path matching, and
3+
# negation (prefixed with !). Only one pattern per line.
4+
.DS_Store
5+
# Common VCS dirs
6+
.git/
7+
.gitignore
8+
.bzr/
9+
.bzrignore
10+
.hg/
11+
.hgignore
12+
.svn/
13+
# Common backup files
14+
*.swp
15+
*.bak
16+
*.tmp
17+
*.orig
18+
*~
19+
# Various IDEs
20+
.project
21+
.idea/
22+
*.tmproj
23+
.vscode/

0 commit comments

Comments
 (0)