|
| 1 | +# Testing devnet3 Configuration |
| 2 | + |
| 3 | +## Setup |
| 4 | + |
| 5 | +The local-devnet has been configured to test devnet3 features with the local zeam image. |
| 6 | + |
| 7 | +### Changes Made: |
| 8 | + |
| 9 | +1. **zeam-cmd.sh**: Updated to use `0xpartha/zeam:local` image |
| 10 | +2. **local-devnet/validator-config.yaml**: Added commented attestation_committee_count parameter |
| 11 | + |
| 12 | +## devnet3 Features Being Tested |
| 13 | + |
| 14 | +### 1. Automatic Aggregator Selection |
| 15 | +- One node will be randomly selected as aggregator on startup |
| 16 | +- The `isAggregator` flag in validator-config.yaml will be automatically updated |
| 17 | +- Only the selected aggregator will receive `--is-aggregator` flag |
| 18 | + |
| 19 | +### 2. Optional Attestation Committee Count |
| 20 | +- Currently commented out (clients use hardcoded default) |
| 21 | +- Can be enabled by uncommenting: `attestation_committee_count: 1` |
| 22 | +- When set, all clients receive `--attestation-committee-count <value>` flag |
| 23 | + |
| 24 | +## Test Commands |
| 25 | + |
| 26 | +### Basic Test - Single Node (zeam_0) |
| 27 | +```bash |
| 28 | +# Run the test script |
| 29 | +./test-local-zeam.sh |
| 30 | + |
| 31 | +# Or manually: |
| 32 | +NETWORK_DIR=local-devnet ./spin-node.sh --node zeam_0 --generateGenesis --cleanData |
| 33 | +``` |
| 34 | + |
| 35 | +### Test with Manual Aggregator Selection |
| 36 | +```bash |
| 37 | +# Specify zeam_0 as aggregator |
| 38 | +NETWORK_DIR=local-devnet ./spin-node.sh --node zeam_0 --generateGenesis --cleanData --aggregator zeam_0 |
| 39 | +``` |
| 40 | + |
| 41 | +### Test Multiple Nodes |
| 42 | +```bash |
| 43 | +# Run all nodes (zeam_0 will be randomly selected as aggregator) |
| 44 | +NETWORK_DIR=local-devnet ./spin-node.sh --node all --generateGenesis --cleanData |
| 45 | + |
| 46 | +# Run specific nodes with zeam_0 as aggregator |
| 47 | +NETWORK_DIR=local-devnet ./spin-node.sh --node "zeam_0 ream_0" --generateGenesis --cleanData --aggregator zeam_0 |
| 48 | +``` |
| 49 | + |
| 50 | +### Test with Attestation Committee Count Override |
| 51 | +```bash |
| 52 | +# 1. Uncomment attestation_committee_count in local-devnet/genesis/validator-config.yaml |
| 53 | +# 2. Set desired value (e.g., attestation_committee_count: 4) |
| 54 | +# 3. Run: |
| 55 | +NETWORK_DIR=local-devnet ./spin-node.sh --node zeam_0 --generateGenesis --cleanData |
| 56 | +``` |
| 57 | + |
| 58 | +## Expected Behavior |
| 59 | + |
| 60 | +### Aggregator Selection |
| 61 | +1. Script displays: "Randomly selected aggregator: zeam_0 (index 0 out of 7 nodes)" OR "Using user-specified aggregator: zeam_0" |
| 62 | +2. Script updates validator-config.yaml: sets `isAggregator: true` for selected node |
| 63 | +3. parse-vc.sh output shows: "Is Aggregator: true" for aggregator, "false" for others |
| 64 | +4. zeam command includes `--is-aggregator` flag for aggregator only |
| 65 | + |
| 66 | +### Attestation Committee Count |
| 67 | +**When NOT set (default):** |
| 68 | +- parse-vc.sh does NOT display "Attestation Committee Count" |
| 69 | +- zeam command does NOT include `--attestation-committee-count` flag |
| 70 | +- Client uses its hardcoded default |
| 71 | + |
| 72 | +**When set (e.g., to 4):** |
| 73 | +- parse-vc.sh displays: "Attestation Committee Count: 4" |
| 74 | +- zeam command includes: `--attestation-committee-count 4` |
| 75 | +- Client uses the specified value |
| 76 | + |
| 77 | +## Verification |
| 78 | + |
| 79 | +### Check Docker Container |
| 80 | +```bash |
| 81 | +# Inspect the running container |
| 82 | +docker inspect zeam_0 |
| 83 | + |
| 84 | +# Check container logs |
| 85 | +docker logs zeam_0 |
| 86 | + |
| 87 | +# Verify command-line arguments |
| 88 | +docker inspect zeam_0 | grep -A20 Args |
| 89 | +``` |
| 90 | + |
| 91 | +### Check Configuration |
| 92 | +```bash |
| 93 | +# Verify aggregator selection in validator-config.yaml |
| 94 | +yq eval '.validators[] | select(.name == "zeam_0") | .isAggregator' local-devnet/genesis/validator-config.yaml |
| 95 | + |
| 96 | +# Check all aggregators |
| 97 | +yq eval '.validators[] | select(.isAggregator == true) | .name' local-devnet/genesis/validator-config.yaml |
| 98 | +``` |
| 99 | + |
| 100 | +### Monitor Node Output |
| 101 | +```bash |
| 102 | +# Watch zeam_0 logs in real-time |
| 103 | +docker logs -f zeam_0 |
| 104 | + |
| 105 | +# Check for aggregator-related messages |
| 106 | +docker logs zeam_0 2>&1 | grep -i aggregat |
| 107 | +``` |
| 108 | + |
| 109 | +## Cleanup |
| 110 | + |
| 111 | +```bash |
| 112 | +# Stop and remove zeam_0 container |
| 113 | +docker rm -f zeam_0 |
| 114 | + |
| 115 | +# Stop all nodes |
| 116 | +NETWORK_DIR=local-devnet ./spin-node.sh --node all --stop |
| 117 | + |
| 118 | +# Clean data directories |
| 119 | +rm -rf local-devnet/data/* |
| 120 | +``` |
| 121 | + |
| 122 | +## Troubleshooting |
| 123 | + |
| 124 | +### Image Not Found |
| 125 | +If you get "image not found" error: |
| 126 | +```bash |
| 127 | +# Check if image exists |
| 128 | +docker images | grep zeam |
| 129 | + |
| 130 | +# Pull/build the image if needed |
| 131 | +# (build instructions depend on your zeam setup) |
| 132 | +``` |
| 133 | + |
| 134 | +### Port Conflicts |
| 135 | +If ports are already in use: |
| 136 | +```bash |
| 137 | +# Check what's using the port |
| 138 | +lsof -i :8081 # zeam_0 metrics port |
| 139 | +lsof -i :9001 # zeam_0 QUIC port |
| 140 | + |
| 141 | +# Kill conflicting processes or change ports in validator-config.yaml |
| 142 | +``` |
| 143 | + |
| 144 | +### Genesis Generation Fails |
| 145 | +```bash |
| 146 | +# Ensure yq is installed |
| 147 | +brew install yq # macOS |
| 148 | +# or follow: https://github.com/mikefarah/yq#install |
| 149 | + |
| 150 | +# Check validator-config.yaml syntax |
| 151 | +yq eval . local-devnet/genesis/validator-config.yaml |
| 152 | +``` |
| 153 | + |
| 154 | +## Notes |
| 155 | + |
| 156 | +- The `0xpartha/zeam:local` image should have the latest devnet3 changes |
| 157 | +- All devnet3 features (aggregator selection, optional attestation_committee_count) are enabled |
| 158 | +- The configuration is set up for local testing with 127.0.0.1 IPs |
| 159 | +- Hash-sig keys will be generated automatically on first run with `--generateGenesis` |
0 commit comments