diff --git a/.claude/prs/docs-node-v0.3.4.md b/.claude/prs/docs-node-v0.3.4.md deleted file mode 100644 index c54dfb3a..00000000 --- a/.claude/prs/docs-node-v0.3.4.md +++ /dev/null @@ -1,39 +0,0 @@ -# Add v0.3.4 validator release documentation - -## Description - -This PR adds comprehensive documentation for the v0.3.4 validator release, introducing genesis block configuration support for faster node startup and GenVM diagnostics integration in the doctor command. The PR also includes development workflow improvements with command definitions for automated commit message generation, PR creation, and knowledge management. - -## Changes - -### Validator Documentation Updates -- **Added v0.3.4 changelog entry** with genesis block configuration and GenVM diagnostics features -- **Added missing v0.3.3 entry** for io.net provider support -- **Updated setup guide** with new version references (v0.3.4), consensus contract addresses, and enhanced doctor command documentation -- **Updated configuration examples** with genesis block number (817855) for faster node startup - -### Development Workflow Enhancements -- **Added CLAUDE.md** with comprehensive development guidelines and validator documentation update patterns -- **Added command definitions** for commit message generation, PR creation, and context tracking -- **Added tracking configuration** for plan analysis and development workflow management - -## Testing - -- Documentation changes are non-functional and do not require code testing -- All markdown files have been validated for proper formatting -- Version references and configuration examples have been verified for accuracy - -## Types of Changes - -- [ ] Bug fix (non-breaking change that fixes an issue) -- [ ] New feature (non-breaking change that adds functionality) -- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) -- [x] Documentation update (changes to documentation, guides, or help content) -- [x] Chore (maintenance tasks, refactoring, or non-functional changes like updating dependencies or improving documentation) - -## Checklist - -- [x] My changes follow the code style of this project -- [x] I have added the necessary documentation (if appropriate) -- [ ] I have added tests (if appropriate) -- [x] All files have been properly formatted and validated \ No newline at end of file diff --git a/.github/scripts/sanitize-config.py b/.github/scripts/sanitize-config.py new file mode 100644 index 00000000..dcecc520 --- /dev/null +++ b/.github/scripts/sanitize-config.py @@ -0,0 +1,46 @@ +#!/usr/bin/env python3 +""" +Sanitize GenLayer node configuration by removing dev and admin sections. + +This script is used by the GitHub Actions workflow to prepare the config +for documentation by removing sensitive sections. +""" + +import sys +import yaml + + +def sanitize_config(config_file_path): + """Remove node.dev and node.admin sections from config file.""" + # Read the YAML file + with open(config_file_path, 'r') as f: + config = yaml.safe_load(f) + + # Remove node.dev and node.admin if they exist + if 'node' in config: + if 'dev' in config['node']: + del config['node']['dev'] + if 'admin' in config['node']: + del config['node']['admin'] + + # Write back to file preserving the structure + with open(config_file_path, 'w') as f: + yaml.dump(config, f, default_flow_style=False, sort_keys=False, allow_unicode=True) + + +def main(): + if len(sys.argv) != 2: + print(f"Usage: {sys.argv[0]} ", file=sys.stderr) + sys.exit(1) + + config_file_path = sys.argv[1] + + try: + sanitize_config(config_file_path) + except Exception as e: + print(f"Error sanitizing config: {e}", file=sys.stderr) + sys.exit(1) + + +if __name__ == "__main__": + main() \ No newline at end of file diff --git a/.github/workflows/sync-docs-from-node.yml b/.github/workflows/sync-docs-from-node.yml index 2bdc2da3..52275197 100644 --- a/.github/workflows/sync-docs-from-node.yml +++ b/.github/workflows/sync-docs-from-node.yml @@ -205,27 +205,7 @@ jobs: sed -i 's|zksyncwebsocketurl: *"[^"]*"|zksyncwebsocketurl: "TODO: Set your GenLayer Chain ZKSync WebSocket RPC URL here"|' "$TEMP_CONFIG" # Remove node.dev and node.admin sections using Python for reliable YAML parsing - python3 -c " -import yaml -import sys - -config_file = sys.argv[1] - -# Read the YAML file -with open(config_file, 'r') as f: - config = yaml.safe_load(f) - -# Remove node.dev and node.admin if they exist -if 'node' in config: - if 'dev' in config['node']: - del config['node']['dev'] - if 'admin' in config['node']: - del config['node']['admin'] - -# Write back to file preserving the structure -with open(config_file, 'w') as f: - yaml.dump(config, f, default_flow_style=False, sort_keys=False, allow_unicode=True) -" "$TEMP_CONFIG" + python3 .github/scripts/sanitize-config.py "$TEMP_CONFIG" # Check if the config has changed if [ -f "$DEST_CONFIG" ]; then