|
| 1 | +# Jolteon Local Environment Configuration |
| 2 | + |
| 3 | +## Overview |
| 4 | + |
| 5 | +I've successfully created a complete configuration for a local Jolteon environment that serves RPC endpoints at `127.0.0.1:9933` without requiring a Cardano node or db sync. This configuration is based on the existing Jolteon Docker environment but adapted for local development and testing. |
| 6 | + |
| 7 | +## Files Created |
| 8 | + |
| 9 | +### Configuration Files (`e2e-tests/config/substrate/`) |
| 10 | + |
| 11 | +1. **`jolteon_local_nodes.json`** - Main node configuration |
| 12 | + - Configures 4 nodes (alice, bob, charlie, dave) all pointing to `127.0.0.1:9933` |
| 13 | + - Uses Jolteon-specific network parameters (--testnet-magic 2) |
| 14 | + - Includes all necessary node metadata (public keys, addresses, etc.) |
| 15 | + - Sets `test_environment` to "jolteon_local" |
| 16 | + |
| 17 | +2. **`jolteon_local_stack.json`** - Stack configuration |
| 18 | + - Configures tools to run locally without Docker containers |
| 19 | + - Sets ogmios to localhost:1337 |
| 20 | + - Configures substrate-node and cardano-cli paths |
| 21 | + |
| 22 | +3. **`jolteon_local-ci.json`** - CI-specific overrides |
| 23 | + - Ensures all nodes point to `127.0.0.1` for CI environments |
| 24 | + - Minimal overrides for CI-specific configurations |
| 25 | + |
| 26 | +### Secrets Files (`e2e-tests/secrets/substrate/jolteon_local/`) |
| 27 | + |
| 28 | +1. **`jolteon_local.json`** - Main secrets file |
| 29 | + - Contains wallet configurations adapted from local environment |
| 30 | + - Uses Jolteon-specific addresses and keys |
| 31 | + - No database or Cardano-specific secrets |
| 32 | + |
| 33 | +2. **`jolteon_local-ci.json`** - CI secrets overrides |
| 34 | + - Minimal overrides for CI environment |
| 35 | + |
| 36 | +3. **`keys/`** - Directory for key files |
| 37 | + - Empty directory ready for any additional key files |
| 38 | + |
| 39 | +### Documentation and Testing |
| 40 | + |
| 41 | +1. **`jolteon_local_README.md`** - Usage documentation |
| 42 | + - Explains how to use the environment |
| 43 | + - Lists prerequisites and requirements |
| 44 | + - Provides example commands |
| 45 | + |
| 46 | +2. **`test_jolteon_local_config.py`** - Configuration validation script |
| 47 | + - Verifies all configuration files can be loaded |
| 48 | + - Checks that all nodes point to localhost |
| 49 | + - Validates secrets directory structure |
| 50 | + |
| 51 | +3. **`test_jolteon_local_example.py`** - Example test file |
| 52 | + - Demonstrates how to use the environment in tests |
| 53 | + - Validates configuration correctness |
| 54 | + - Shows proper test structure |
| 55 | + |
| 56 | +## Key Features |
| 57 | + |
| 58 | +### Environment Characteristics |
| 59 | +- **RPC Endpoint**: `127.0.0.1:9933` |
| 60 | +- **Network**: Testnet (--testnet-magic 2) |
| 61 | +- **No Cardano Node**: Environment doesn't require Cardano node or db sync |
| 62 | +- **No Docker**: Runs directly on localhost without containers |
| 63 | +- **Multiple Nodes**: All nodes point to the same localhost endpoint |
| 64 | + |
| 65 | +### Configuration Structure |
| 66 | +- Based on Jolteon Docker environment but simplified for local use |
| 67 | +- Maintains compatibility with existing test framework |
| 68 | +- Supports both regular and CI environments |
| 69 | +- Includes all necessary metadata for Jolteon-specific features |
| 70 | + |
| 71 | +## Usage |
| 72 | + |
| 73 | +### Running Tests |
| 74 | +```bash |
| 75 | +# Basic usage |
| 76 | +pytest --env=jolteon_local --blockchain=substrate |
| 77 | + |
| 78 | +# With CI overrides |
| 79 | +pytest --env=jolteon_local --blockchain=substrate --ci-run |
| 80 | + |
| 81 | +# Run specific test |
| 82 | +pytest --env=jolteon_local --blockchain=substrate tests/test_jolteon_local_example.py |
| 83 | +``` |
| 84 | + |
| 85 | +### Validation |
| 86 | +```bash |
| 87 | +# Test configuration |
| 88 | +python e2e-tests/config/substrate/test_jolteon_local_config.py |
| 89 | + |
| 90 | +# Run example tests |
| 91 | +pytest --env=jolteon_local --blockchain=substrate tests/test_jolteon_local_example.py -v |
| 92 | +``` |
| 93 | + |
| 94 | +## Prerequisites |
| 95 | + |
| 96 | +1. **Jolteon Partner Chain Node**: Must be running locally on port 9933 |
| 97 | +2. **Network Configuration**: Node should be configured for testnet (--testnet-magic 2) |
| 98 | +3. **Required Tools**: `substrate-node` and optionally `cardano-cli` in PATH |
| 99 | + |
| 100 | +## Differences from Jolteon Docker Environment |
| 101 | + |
| 102 | +| Aspect | Jolteon Docker | Jolteon Local | |
| 103 | +|--------|----------------|---------------| |
| 104 | +| **Host** | DNS names (alice.jolteon.sc.iog.io) | 127.0.0.1 | |
| 105 | +| **Port** | 443 (HTTPS) | 9933 (HTTP) | |
| 106 | +| **Protocol** | HTTPS | HTTP | |
| 107 | +| **Docker** | Required | Not used | |
| 108 | +| **Cardano Node** | Included | Not required | |
| 109 | +| **DB Sync** | Included | Not required | |
| 110 | +| **Secrets** | Complex with keys | Simplified | |
| 111 | + |
| 112 | +## Next Steps |
| 113 | + |
| 114 | +1. **Start Jolteon Node**: Ensure you have a Jolteon Partner Chain node running locally |
| 115 | +2. **Test Configuration**: Run the validation script to verify setup |
| 116 | +3. **Run Tests**: Execute tests against the local environment |
| 117 | +4. **Customize**: Modify configuration as needed for your specific setup |
| 118 | + |
| 119 | +The configuration is now ready to use and should work seamlessly with the existing e2e test framework! |
0 commit comments