# VMID Enode Configuration Analysis

**Date**: 2026-01-02  
**Purpose**: Check for duplicate enodes, missing enodes, and configuration issues

---

## Summary

✅ **No duplicate enodes found**  
✅ **All running nodes are in permissions file**  
⚠️ **VMID 2502 has p2p-host configuration mismatch (config vs permissions)**  
✅ **Validators 100/101 are correctly configured**

---

## Detailed Findings

### 1. Static-Nodes.json Analysis

**Location**: `/genesis/static-nodes.json` (on all nodes)

**Contents**:
- ✅ 5 validators only (100, 101, 102, 103, 104)
- ✅ No RPC nodes (correct - static-nodes should only have validators)
- ✅ No duplicate enodes
- ✅ All enodes properly formatted

**Status**: ✅ **CORRECT**

### 2. Permissions-Nodes.toml Analysis

**Location**: `/etc/besu/permissions-nodes.toml` (on validators)  
**Location**: `/permissions/permissions-nodes.toml` (on RPC nodes)

**Current Contents** (13 enodes):
- ✅ Validators: 100, 101, 102, 103, 104 (5 nodes)
- ✅ Sentries: 150, 151, 152, 153 (4 nodes)
- ✅ RPC Nodes: 240, 250, 251, 252 (4 nodes)

**Missing Enodes**:
- ✅ VMID 2401 (192.168.11.241) - **Service inactive** (not running, not needed)
- ✅ VMID 2402 (192.168.11.242) - **Service inactive** (not running, not needed)
- ⚠️ VMIDs 2505-2508 - Need to verify if these are running

**Status**: ✅ **All running nodes are in permissions file**

### 3. Enode Status by VMID

| VMID | IP | Enode Status | In Permissions | Notes |
|------|----|--------------|----------------|-------|
| 1000 | 192.168.11.100 | ✅ Found | ✅ Yes | Validator |
| 1001 | 192.168.11.101 | ✅ Found | ✅ Yes | Validator |
| 2400 | 192.168.11.240 | ✅ Found | ✅ Yes | RPC Node |
| 2401 | 192.168.11.241 | ❌ Not Running | ❌ No | Service inactive - not needed |
| 2402 | 192.168.11.242 | ❌ Not Running | ❌ No | Service inactive - not needed |
| 2500 | 192.168.11.250 | ✅ Found | ✅ Yes | RPC Node |
| 2501 | 192.168.11.251 | ✅ Found | ✅ Yes | RPC Node |
| 2502 | 192.168.11.252 | ⚠️ Wrong IP | ✅ Yes | **p2p-host issue** |
| 2505-2508 | Various | ❓ Unknown | ❌ No | Need verification |

### 4. Critical Issue: VMID 2502

**Problem**: VMID 2502's enode shows `@0.0.0.0:30303` instead of `@192.168.11.252:30303`

**Impact**: This enode is in the permissions file but has incorrect IP, which could cause connection issues.

**Status**: ⚠️ **NEEDS FIX**

### 5. Duplicate Check Results

- ✅ No duplicate enodes (same enode appears multiple times)
- ✅ No duplicate node IDs with different IPs
- ✅ No duplicate IPs with different enodes
- ✅ Each IP has exactly one enode

**Status**: ✅ **NO DUPLICATES FOUND**

---

## Issues to Fix

### Issue 1: VMIDs 2401, 2402 (RESOLVED)

**Status**: ✅ Services are inactive (not running), so they don't need to be in permissions file

### Issue 2: VMID 2502 p2p-host Configuration (MISMATCH)

**Problem**: 
- Config file has: `p2p-host="0.0.0.0"`
- Running node shows: `@0.0.0.0:30303` in logs
- Permissions file has: `@192.168.11.252:30303` (CORRECT)

**Impact**: The permissions file has the correct enode, but the running node is using `0.0.0.0`, creating a mismatch. Other nodes will try to connect using the permissions file enode (192.168.11.252), but the node is listening on 0.0.0.0.

**Action Required**:
1. Fix `p2p-host` in `/etc/besu/config-rpc-public.toml` to `192.168.11.252`
2. Restart Besu service
3. Verify new enode matches permissions file

---

## Recommendations

1. **Fix VMID 2502 p2p-host** - Update configuration and permissions file
2. **Add VMIDs 2401, 2402** - If they're running, add their enodes to permissions
3. **Verify VMIDs 2505-2508** - Check if these nodes exist and need to be added
4. **No action needed for validators 100/101** - They are correctly configured

---

**Status**: Configuration analysis complete - Found 2 issues to fix
