# Besu Enode Configuration - Next Steps Status

**Date**: 2026-01-03  
**Status**: ✅ **CURRENT FILES DEPLOYED** | ⏳ **AWAITING KEY GENERATION**

---

## Current Status

### ✅ Completed
- All known enodes (9 total) are correctly configured in both files:
  - `static-nodes.json`: 5 validators + 4 RPC nodes (2400, 2500, 2501, 2502)
  - `permissions-nodes.toml`: 5 validators + 4 RPC nodes (2400, 2500, 2501, 2502)
- Files deployed to all nodes (RPC nodes and validators)
- Configuration is correct and consistent across all nodes

### ⏳ Pending
The remaining RPC nodes (2401, 2402, 2503-2508) have not generated node keys yet, so their enodes cannot be extracted. These nodes are either:
- Still starting up (services in "activating" state)
- Have configuration issues preventing key generation
- Need more time to initialize

---

## Node Status Summary

| VMID | IP Address | Service Status | Key Status | Enode Status |
|------|------------|----------------|------------|--------------|
| 2400 | 192.168.11.240 | ✅ Active | ✅ Has key | ✅ Included |
| 2401 | 192.168.11.241 | ✅ Active | ❌ No key | ⏳ Pending |
| 2402 | 192.168.11.242 | ⏳ Activating | ❌ No key | ⏳ Pending |
| 2500 | 192.168.11.250 | ✅ Active | ✅ Has key | ✅ Included |
| 2501 | 192.168.11.251 | ✅ Active | ✅ Has key | ✅ Included |
| 2502 | 192.168.11.252 | ✅ Active | ✅ Has key | ✅ Included |
| 2503 | 192.168.11.253 | ✅ Active | ❌ No key | ⏳ Pending |
| 2504 | 192.168.11.254 | ⏳ Activating | ❌ No key | ⏳ Pending |
| 2505 | 192.168.11.201 | ⏳ Activating | ❌ No key | ⏳ Pending |
| 2506 | 192.168.11.202 | ⏳ Activating | ❌ No key | ⏳ Pending |
| 2507 | 192.168.11.203 | ⏳ Activating | ❌ No key | ⏳ Pending |
| 2508 | 192.168.11.204 | ⏳ Activating | ❌ No key | ⏳ Pending |

---

## Next Steps (When Keys Are Generated)

Once the remaining nodes generate their keys and start successfully:

1. **Extract Enodes**:
   ```bash
   # For each node that becomes active with a key
   curl -X POST -H "Content-Type: application/json" \
     --data '{"jsonrpc":"2.0","method":"admin_nodeInfo","params":[],"id":1}' \
     http://<NODE_IP>:8545
   ```
   Extract the `enode` field from the response.

2. **Update Files**:
   - Add new enodes to `static-nodes.json`
   - Add new enodes to `permissions-nodes.toml`
   - Ensure all nodes in `static-nodes.json` are also in `permissions-nodes.toml`

3. **Re-deploy**:
   - Copy updated files to all RPC nodes (`/genesis/static-nodes.json`, `/permissions/permissions-nodes.toml`)
   - Copy updated `permissions-nodes.toml` to all validators (`/etc/besu/permissions-nodes.toml`)
   - Set correct ownership: `chown besu:besu <file>`

4. **Restart Services** (if needed):
   - Besu services should pick up file changes automatically
   - If not, restart: `systemctl restart besu-rpc` (RPC nodes) or `systemctl restart besu-validator` (validators)

---

## Current Configuration

All nodes currently have:
- ✅ Correct `static-nodes.json` with 9 enodes
- ✅ Correct `permissions-nodes.toml` with 9 enodes
- ✅ Files properly deployed and owned by `besu:besu`
- ✅ All known RPC node enodes included

---

## Monitoring

To monitor when keys are generated:
```bash
# Check if key file exists
pct exec <VMID> -- test -f /data/besu/key && echo "Key exists" || echo "No key"

# Check service status
pct exec <VMID> -- systemctl is-active besu-rpc

# Check if RPC is responding
curl -X POST -H "Content-Type: application/json" \
  --data '{"jsonrpc":"2.0","method":"net_version","params":[],"id":1}' \
  http://<NODE_IP>:8545
```

---

**Last Updated**: 2026-01-03
