From 40b0c263c0448f8d8d1e3b428d3fea25bcbbf32b Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Thu, 22 Jan 2026 17:29:25 +0000 Subject: [PATCH 1/8] docs: Add copy buttons to setup guide commands and limit version list output MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Agustín Díaz --- pages/validators/setup-guide.mdx | 74 ++++++++++++++++---------------- 1 file changed, 37 insertions(+), 37 deletions(-) diff --git a/pages/validators/setup-guide.mdx b/pages/validators/setup-guide.mdx index 75aecdb6..9938fab5 100644 --- a/pages/validators/setup-guide.mdx +++ b/pages/validators/setup-guide.mdx @@ -28,7 +28,7 @@ The wizard outputs all three addresses at the end. Save them - you'll need the V - **Node.js** (v18 or higher) - **GenLayer CLI** - Install the latest version: - ```bash + ```bash copy npm install -g genlayer ``` - **GEN tokens** - You need at least **42,000 GEN** for the minimum self-stake requirement @@ -37,7 +37,7 @@ The wizard outputs all three addresses at the end. Save them - you'll need the V The easiest way to create your validator wallet is using the interactive wizard: -```bash +```bash copy genlayer staking wizard ``` @@ -63,13 +63,13 @@ The wizard creates and exports an operator keystore file for you to transfer to After completing the wizard, verify your status: -```bash +```bash copy genlayer staking validator-info --validator 0xYourValidatorWallet... ``` ### Managing Your Validator -```bash +```bash copy # Add more stake genlayer staking validator-deposit --amount 1000gen @@ -124,8 +124,8 @@ See the [System Requirements](/validators/system-requirements) page for detailed You can use this command to list available versions: - ```sh - curl -s "https://storage.googleapis.com/storage/v1/b/gh-af/o?prefix=genlayer-node/bin/amd64" | grep -o '"name": *"[^"]*"' | sed -n 's/.*\/\(v[^/]*\)\/.*/\1/p' | sort -ru + ```sh copy + curl -s "https://storage.googleapis.com/storage/v1/b/gh-af/o?prefix=genlayer-node/bin/amd64" | grep -o '"name": *"[^"]*"' | sed -n 's/.*\/\(v[^/]*\)\/.*/\1/p' | sort -ru | head -n 5 ``` You should see a list like this @@ -149,24 +149,24 @@ See the [System Requirements](/validators/system-requirements) page for detailed Typically, you will want to run the latest version 2. Download the packaged application - ```sh + ```sh copy export version=v0.4.4 # set your desired version here wget https://storage.googleapis.com/gh-af/genlayer-node/bin/amd64/${version}/genlayer-node-linux-amd64-${version}.tar.gz ``` 3. Extract the node software - ```sh + ```sh copy mkdir -p ${version} tar -xzvf `genlayer-node-linux-amd64-${version}.tar.gz` -C `./${version}` ``` 4. Change the directory - ```sh + ```sh copy cd `./${version}` ``` 5. Run Genvm setup - ```sh + ```sh copy python3 ./third_party/genvm/bin/setup.py ``` It does following: @@ -188,7 +188,7 @@ The file needs to be located at `configs/node/config.yaml` You can use the following example configuration. **Note:** For most users, you will only need to modify the `zksyncurl` and `zksyncwebsocketurl` values below. -```yaml +```yaml copy # rollup configuration rollup: genlayerchainrpcurl: "TODO: Set your GenLayer Chain ZKSync HTTP RPC URL here" # GenLayer Chain RPC URL @@ -325,7 +325,7 @@ Any configuration value in `config.yaml` can be overridden using environment var **Usage example:** -```sh +```sh copy # Override the RPC port export GENLAYERNODE_CONSENSUS_CONTRACTMAINADDRESS="0x..." @@ -402,7 +402,7 @@ The operator key is used by your node to sign blocks and perform validator dutie If you used `genlayer staking wizard`, it exported an operator keystore file. Transfer this file to your validator server and import it: -```sh +```sh copy ./bin/genlayernode account import \ --password "your node password" \ --passphrase "password you set when exporting from wizard" \ @@ -423,7 +423,7 @@ Account imported: You can also generate a new operator key directly on the server: -```sh +```sh copy ./bin/genlayernode account new -c $(pwd)/configs/node/config.yaml --setup --password "your secret password" ``` @@ -433,7 +433,7 @@ Then use this address when running the wizard on your local machine. To restore from a backup (e.g., after migrating to a new server): -```sh +```sh copy ./bin/genlayernode account import \ --password "your node password" \ --passphrase "your backup encryption passphrase" \ @@ -450,7 +450,7 @@ To restore from a backup (e.g., after migrating to a new server): After setting up your operator key, back it up securely: -```sh +```sh copy ./bin/genlayernode account export \ --password "your node password" \ --address "your operator address" \ @@ -484,7 +484,7 @@ Once you have configured everything, you are ready to start the node. Set the appropriate environment variable for your chosen LLM provider: - ```sh + ```sh copy # For Heurist export HEURISTKEY='your_heurist_api_key' @@ -499,14 +499,14 @@ Once you have configured everything, you are ready to start the node. 2. Run the WebDriver container - ```sh + ```sh copy docker compose up -d # Starts the WebDriver needed by the GenVM web module ``` 3. (Optional) Run two services (modules) in background (this is a crucial step for running _Intelligent_ contracts). This can be done automatically or manually. - To start them automatically in node configuration set `genvm.manage_modules` to `true` - To start them manually run - ```bash + ```bash copy ./third_party/genvm/bin/genvm-modules web & ./third_party/genvm/bin/genvm-modules llm & ``` @@ -520,7 +520,7 @@ Once you have configured everything, you are ready to start the node. To ensure your node is correctly configured, you can run the following command: - ```sh + ```sh copy ./bin/genlayernode doctor ``` @@ -532,7 +532,7 @@ Once you have configured everything, you are ready to start the node. 5. Run the node - ```sh + ```sh copy ./bin/genlayernode run -c $(pwd)/configs/node/config.yaml --password "your secret password" # The same password you used when creating the account ``` @@ -550,7 +550,7 @@ You can also run the GenLayer node using Docker and Docker Compose. 1. Create a `docker-compose.yaml` file with the following content: -```yaml +```yaml copy services: webdriver-container: container_name: genlayer-node-webdriver @@ -604,7 +604,7 @@ Create `genvm-module-web-docker.yaml` in the same directory as your `docker-comp - Copy the contents of `third_party/genvm/config/genvm-module-web.yaml` into `genvm-module-web-docker.yaml`. - Modify the `webdriver_host` configuration to use the service name `webdriver-container` instead of `localhost`: -```yaml +```yaml copy webdriver_host: http://webdriver-container:4444 ``` @@ -621,7 +621,7 @@ The key difference: This `.env` file serves two purposes: it configures Docker Compose variables (like `NODE_VERSION`, `NODE_PASSWORD`, ports) and can also include `GENLAYERNODE_*` variables to override node configuration values as described in [Overriding Configuration with Environment Variables](#overriding-configuration-with-environment-variables). -```env +```env copy # GenLayer Node Release Configuration # ============================================================================= @@ -662,7 +662,7 @@ or simply use the provided `docker-compose.yaml`, `.env.example` and the `genvm- To ensure your node is correctly configured, you can run the following command: -```sh +```sh copy source .env && docker run --rm --env-file ./.env \ -v ${NODE_CONFIG_PATH:-./configs/node/config.yaml}:/app/configs/node/config.yaml \ yeagerai/genlayer-node:${NODE_VERSION:-v0.4.0} \ @@ -671,7 +671,7 @@ source .env && docker run --rm --env-file ./.env \ 5. Start the services using Docker Compose: -```sh +```sh copy source .env && docker compose --profile node up -d ``` @@ -683,7 +683,7 @@ GenLayer validators expose comprehensive metrics that are ready for consumption The metrics endpoint is exposed on the operations port (default: 9153) configured in your `config.yaml`: -```yaml +```yaml copy node: ops: port: 9153 # Metrics port @@ -708,7 +708,7 @@ The validator exposes various metric collectors that can be individually configu You can customize metrics collection in your `config.yaml`: -```yaml +```yaml copy metrics: interval: "15s" # Default collection interval collectors: @@ -727,7 +727,7 @@ metrics: To check if metrics are working correctly: -```bash +```bash copy # Get all available metrics curl http://localhost:9153/metrics @@ -776,7 +776,7 @@ To contribute your node's metrics and logs to the centralized GenLayer Foundatio 1. **Create or update .env** (next to your docker-compose.yaml): -```env +```env copy # Grafana Cloud credentials (request from Foundation team in Discord) CENTRAL_MONITORING_URL=https://prometheus-prod-...grafana.net CENTRAL_LOKI_URL=https://logs-prod-...grafana.net @@ -795,7 +795,7 @@ METRICS_SCRAPE_INTERVAL=15s 2. **Add or verify the Alloy service in docker-compose.yaml (copy if missing): -```yaml +```yaml copy alloy: image: grafana/alloy:latest container_name: genlayer-node-alloy @@ -835,7 +835,7 @@ volumes: 3. **Create or update ./alloy-config.river** (use the provided version — it handles logs and metrics forwarding): -```river +```river copy // Grafana Alloy Configuration for GenLayer Node Telemetry // Handles both log collection and metrics forwarding @@ -943,7 +943,7 @@ prometheus.scrape "alloy" { 4. **Start Alloy**: -```bash +```bash copy docker compose --profile monitoring up -d ``` @@ -952,11 +952,11 @@ docker compose --profile monitoring up -d - Open Alloy UI: http://localhost:12345/targets — the "genlayer_node" scrape target should show status **UP**. - Check logs for successful sends: -```bash +```bash copy docker logs genlayer-node-alloy | grep "sent batch" ``` -```bash +```bash copy docker logs genlayer-node-alloy | grep "remote_write" ``` @@ -968,7 +968,7 @@ Look for messages indicating successful batch sending (no error codes like 401, Troubleshooting - No local metrics: -```bash +```bash copy curl http://localhost:9153/metrics ``` @@ -977,6 +977,6 @@ Authentication errors (401/403): Double-check MONITORING_USERNAME and MONITORING No data pushed: Ensure URLs in .env have no trailing slash. Help: Share Alloy logs -```bash +```bash copy docker logs genlayer-node-alloy ``` From 3888b79b878742280c36161f37e0f2c38fabd27c Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Thu, 22 Jan 2026 17:32:10 +0000 Subject: [PATCH 2/8] docs: Update example output to show only 5 versions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Agustín Díaz --- pages/validators/setup-guide.mdx | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/pages/validators/setup-guide.mdx b/pages/validators/setup-guide.mdx index 9938fab5..1bd78087 100644 --- a/pages/validators/setup-guide.mdx +++ b/pages/validators/setup-guide.mdx @@ -131,19 +131,11 @@ See the [System Requirements](/validators/system-requirements) page for detailed You should see a list like this ```sh - v0.4.4 - v0.4.3 - v0.4.2 - v0.4.1 - v0.4.0 - v0.3.11 - v0.3.10 - v0.3.9 - ... - v0.3.2 - v0.3.1 - v0.3.0 - ... + v0.4.4 + v0.4.3 + v0.4.2 + v0.4.1 + v0.4.0 ``` Typically, you will want to run the latest version From 89c3ee66931ffbca2bc7572c9f3b0ecad95683df Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Thu, 22 Jan 2026 17:38:05 +0000 Subject: [PATCH 3/8] docs: Update example output with release candidate versions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Agustín Díaz --- pages/validators/setup-guide.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pages/validators/setup-guide.mdx b/pages/validators/setup-guide.mdx index 1bd78087..7fa043e6 100644 --- a/pages/validators/setup-guide.mdx +++ b/pages/validators/setup-guide.mdx @@ -133,9 +133,9 @@ See the [System Requirements](/validators/system-requirements) page for detailed ```sh v0.4.4 v0.4.3 + v0.4.2-rc.2 + v0.4.2-rc.1 v0.4.2 - v0.4.1 - v0.4.0 ``` Typically, you will want to run the latest version From 89d784787a465beea59c26e415adfed554a31968 Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Fri, 23 Jan 2026 14:08:05 +0000 Subject: [PATCH 4/8] docs: Align example output with sync script format MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Agustín Díaz --- pages/validators/setup-guide.mdx | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/pages/validators/setup-guide.mdx b/pages/validators/setup-guide.mdx index 7fa043e6..9938fab5 100644 --- a/pages/validators/setup-guide.mdx +++ b/pages/validators/setup-guide.mdx @@ -131,11 +131,19 @@ See the [System Requirements](/validators/system-requirements) page for detailed You should see a list like this ```sh - v0.4.4 - v0.4.3 - v0.4.2-rc.2 - v0.4.2-rc.1 - v0.4.2 + v0.4.4 + v0.4.3 + v0.4.2 + v0.4.1 + v0.4.0 + v0.3.11 + v0.3.10 + v0.3.9 + ... + v0.3.2 + v0.3.1 + v0.3.0 + ... ``` Typically, you will want to run the latest version From 6479d4de4dbc1a99217718256865917804415362 Mon Sep 17 00:00:00 2001 From: Agustin Ramiro Diaz Date: Fri, 23 Jan 2026 11:05:26 -0300 Subject: [PATCH 5/8] docs: Exclude release candidate versions from version list in setup guide --- pages/validators/setup-guide.mdx | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/pages/validators/setup-guide.mdx b/pages/validators/setup-guide.mdx index 96e34e73..0109bd49 100644 --- a/pages/validators/setup-guide.mdx +++ b/pages/validators/setup-guide.mdx @@ -125,25 +125,17 @@ See the [System Requirements](/validators/system-requirements) page for detailed You can use this command to list available versions: ```sh copy - curl -s "https://storage.googleapis.com/storage/v1/b/gh-af/o?prefix=genlayer-node/bin/amd64" | grep -o '"name": *"[^"]*"' | sed -n 's/.*\/\(v[^/]*\)\/.*/\1/p' | sort -ru | head -n 5 + curl -s "https://storage.googleapis.com/storage/v1/b/gh-af/o?prefix=genlayer-node/bin/amd64" | grep -o '"name": *"[^"]*"' | sed -n 's/.*\/\(v[^/]*\)\/.*/\1/p' | sort -ru | grep -v "rc" | head -n 5 ``` You should see a list like this ```sh - v0.4.4 - v0.4.3 - v0.4.2 - v0.4.1 - v0.4.0 - v0.3.11 - v0.3.10 - v0.3.9 - ... - v0.3.2 - v0.3.1 - v0.3.0 - ... + v0.4.4 + v0.4.3 + v0.4.2 + v0.4.1 + v0.4.0 ``` Typically, you will want to run the latest version From ad5386927fd97551ece9dddea800c0953d8af667 Mon Sep 17 00:00:00 2001 From: Agustin Ramiro Diaz Date: Fri, 23 Jan 2026 11:16:20 -0300 Subject: [PATCH 6/8] docs: Update YAML block patterns in setup guide scripts to accommodate additional attributes --- scripts/update-config-in-setup-guide.js | 4 +- .../update-docker-compose-in-setup-guide.js | 3 +- scripts/update-setup-guide-versions.js | 57 +++---------------- 3 files changed, 14 insertions(+), 50 deletions(-) diff --git a/scripts/update-config-in-setup-guide.js b/scripts/update-config-in-setup-guide.js index cab78c8a..44519ea5 100755 --- a/scripts/update-config-in-setup-guide.js +++ b/scripts/update-config-in-setup-guide.js @@ -28,7 +28,9 @@ function updateConfigInSetupGuide() { // Pattern to match the YAML config block // Looks for the text before the yaml block, the yaml block itself, and the text after - const configPattern = /(You can use the following example configuration[^`]*```yaml\n)([\s\S]*?)(\n```)/; + // Note: The yaml block may have additional attributes like "copy" (```yaml copy) + // Uses [\s\S]*? to match any characters (including backticks in inline code) until the yaml block + const configPattern = /(You can use the following example configuration[\s\S]*?```yaml[^\n]*\n)([\s\S]*?)(\n```)/; if (configPattern.test(setupGuideContent)) { // Replace the config content while preserving the surrounding text diff --git a/scripts/update-docker-compose-in-setup-guide.js b/scripts/update-docker-compose-in-setup-guide.js index 12099cd2..65576091 100755 --- a/scripts/update-docker-compose-in-setup-guide.js +++ b/scripts/update-docker-compose-in-setup-guide.js @@ -29,7 +29,8 @@ function updateDockerComposeInSetupGuide() { // Pattern to match the docker-compose YAML block // Looks for the text before the yaml block, the yaml block itself, and the text after - const dockerComposePattern = /(Create a `docker-compose\.yaml` file with the following content:[^`]*```yaml\n)([\s\S]*?)(\n```)/; + // Note: The yaml block may have additional attributes like "copy" (```yaml copy) + const dockerComposePattern = /(Create a `docker-compose\.yaml` file with the following content:[^`]*```yaml[^\n]*\n)([\s\S]*?)(\n```)/; if (dockerComposePattern.test(setupGuideContent)) { // Replace the docker-compose content while preserving the surrounding text diff --git a/scripts/update-setup-guide-versions.js b/scripts/update-setup-guide-versions.js index d979cea5..063d170f 100644 --- a/scripts/update-setup-guide-versions.js +++ b/scripts/update-setup-guide-versions.js @@ -58,57 +58,18 @@ function updateSetupGuideVersions() { // Read the setup guide let setupGuideContent = fs.readFileSync(setupGuidePath, 'utf8'); - // Update the version list with abbreviated format - // Show all current minor version, then first 3 and last 3 of previous minor version with "..." in between + // Update the version list to match the curl command output + // The curl command uses: grep -v "rc" | head -n 5 + // So we filter out rc versions and show only 5 versions - // Parse version to get major.minor - const parseMinorVersion = (v) => { - const match = v.match(/v(\d+)\.(\d+)\.\d+/); - if (!match) return null; - return `${match[1]}.${match[2]}`; - }; + // Filter out testnet and rc versions for the display list (matches grep -v "rc") + const releaseVersions = versions.filter(v => !v.includes('testnet') && !v.includes('rc')); - // Filter out testnet versions for the display list - const releaseVersions = versions.filter(v => !v.includes('testnet')); + // Take only the first 5 versions (matches head -n 5) + const displayVersions = releaseVersions.slice(0, 5); - // Get the current minor version (from latest version) - const currentMinor = parseMinorVersion(latestVersion); - - // Get all versions from current minor version - const currentMinorVersions = releaseVersions.filter(v => parseMinorVersion(v) === currentMinor); - - // Get the previous minor version - const previousMinorVersions = releaseVersions.filter(v => { - const minor = parseMinorVersion(v); - return minor && minor !== currentMinor; - }); - - // Build the abbreviated list - const versionListItems = [ - ...currentMinorVersions.map(v => ` ${v}`) - ]; - - if (previousMinorVersions.length > 0) { - const first3 = previousMinorVersions.slice(0, 3); - const last3 = previousMinorVersions.slice(-3); - - // Add first 3 of previous minor - versionListItems.push(...first3.map(v => ` ${v}`)); - - // Add "..." if there are versions in between - if (previousMinorVersions.length > 6) { - versionListItems.push(' ...'); - } - - // Add last 3 of previous minor (avoid duplicates if list is small) - const last3Unique = last3.filter(v => !first3.includes(v)); - versionListItems.push(...last3Unique.map(v => ` ${v}`)); - - // Add trailing "..." to indicate older versions exist - versionListItems.push(' ...'); - } - - const versionListIndented = versionListItems.join('\n'); + // Build the version list (no indentation, matches actual curl output) + const versionListIndented = displayVersions.map(v => ` ${v}`).join('\n'); // Replace the version list (between "You should see a list like this" and "Typically you will want") const versionListPattern = /(You should see a list like this\s*\n\s*```sh\n)([\s\S]*?)(\n\s*```\s*\n\s*Typically,? you will want)/; From cfe527ee0eae851e411b1619cf7b5d4003226f66 Mon Sep 17 00:00:00 2001 From: Agustin Ramiro Diaz Date: Fri, 23 Jan 2026 11:18:09 -0300 Subject: [PATCH 7/8] docs: Enhance setup guide by adding new attributes to YAML block patterns --- .github/workflows/check-docs-sync.yml | 46 +++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 .github/workflows/check-docs-sync.yml diff --git a/.github/workflows/check-docs-sync.yml b/.github/workflows/check-docs-sync.yml new file mode 100644 index 00000000..1921712c --- /dev/null +++ b/.github/workflows/check-docs-sync.yml @@ -0,0 +1,46 @@ +name: Check Documentation Sync + +on: + pull_request: + branches: + - main + +jobs: + check-sync: + name: 'Verify Documentation is Synced' + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: '20' + cache: 'npm' + + - name: Install dependencies + run: npm ci + + - name: Run documentation sync scripts + run: | + npm run node-generate-changelog + npm run node-update-setup-guide + npm run node-update-config + npm run node-update-docker-compose + npm run node-generate-api-docs + + - name: Check for uncommitted changes + run: | + if [[ -n "$(git status --porcelain)" ]]; then + echo "::error::Documentation is out of sync. Please run the sync scripts locally and commit the changes." + echo "" + echo "Files with uncommitted changes:" + git status --porcelain + echo "" + echo "Diff:" + git diff + exit 1 + else + echo "Documentation is in sync." + fi From a49f0e86fa7c004f4b22838c29d506458950457b Mon Sep 17 00:00:00 2001 From: Agustin Ramiro Diaz Date: Fri, 23 Jan 2026 11:25:31 -0300 Subject: [PATCH 8/8] ci: Add GitHub Actions workflow to verify Node documentation sync on pull requests --- .../{check-docs-sync.yml => check-node-docs-sync.yml} | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename .github/workflows/{check-docs-sync.yml => check-node-docs-sync.yml} (93%) diff --git a/.github/workflows/check-docs-sync.yml b/.github/workflows/check-node-docs-sync.yml similarity index 93% rename from .github/workflows/check-docs-sync.yml rename to .github/workflows/check-node-docs-sync.yml index 1921712c..1e12b2ed 100644 --- a/.github/workflows/check-docs-sync.yml +++ b/.github/workflows/check-node-docs-sync.yml @@ -1,4 +1,4 @@ -name: Check Documentation Sync +name: Check Node Documentation Sync on: pull_request: @@ -7,7 +7,7 @@ on: jobs: check-sync: - name: 'Verify Documentation is Synced' + name: 'Verify Node Documentation is Synced' runs-on: ubuntu-latest steps: - name: Checkout repository