Refactor code for improved readability and performance

This commit is contained in:
defiQUG
2025-12-21 22:32:09 -08:00
parent 79e3c02f50
commit b45c2006be
2259 changed files with 380318 additions and 2 deletions

View File

@@ -0,0 +1,185 @@
# Final VMID Allocation Plan
**Updated**: Complete sovereign-scale allocation with all domains
## Complete VMID Allocation Table
| VMID Range | Domain | Total VMIDs | Initial Usage | Available |
|-----------------|----------------------------------------------------------------|-------------|---------------|-----------|
| **10004999** | **Besu Sovereign Network** | 4,000 | ~17 | ~3,983 |
| 50005099 | Blockscout | 100 | 1 | 99 |
| 52005299 | Cacti | 100 | 1 | 99 |
| 54005599 | Chainlink CCIP | 200 | 1+ | 199 |
| 57005999 | (available / buffer) | 300 | 0 | 300 |
| 60006099 | Fabric | 100 | 1 | 99 |
| 62006299 | FireFly | 100 | 1 | 99 |
| 64007399 | Indy | 1,000 | 1 | 999 |
| 78008999 | Sankofa / Phoenix / PanTel | 1,200 | 1 | 1,199 |
| **1000013999** | **Sovereign Cloud Band (SMOM / ICCC / DBIS / Absolute Realms)** | 4,000 | 1 | 3,999 |
**Total Allocated**: 11,000 VMIDs (1000-13999)
**Total Initial Usage**: ~26 containers
**Total Available**: ~10,974 VMIDs
---
## Detailed Breakdown
### Besu Sovereign Network (1000-4999) - 4,000 VMIDs
#### Validators (1000-1499) - 500 VMIDs
- **1000-1004**: Initial validators (5 nodes)
- **1005-1499**: Reserved for validator expansion (495 VMIDs)
#### Sentries (1500-2499) - 1,000 VMIDs
- **1500-1503**: Initial sentries (4 nodes)
- **1504-2499**: Reserved for sentry expansion (996 VMIDs)
#### RPC / Gateways (2500-3499) - 1,000 VMIDs
- **2500-2502**: Initial RPC nodes (3 nodes)
- **2503-3499**: Reserved for RPC/Gateway expansion (997 VMIDs)
#### Archive / Telemetry (3500-4299) - 800 VMIDs
- **3500+**: Archive / Snapshots / Mirrors / Telemetry
#### Reserved Besu Expansion (4300-4999) - 700 VMIDs
- **4300-4999**: Reserved for future Besu expansion
---
### Blockscout Explorer (5000-5099) - 100 VMIDs
- **5000**: Blockscout primary (1 node)
- **5001-5099**: Indexer replicas / DB / analytics / HA (99 VMIDs)
---
### Cacti (5200-5299) - 100 VMIDs
- **5200**: Cacti core (1 node)
- **5201-5299**: connectors / adapters / relays / HA (99 VMIDs)
---
### Chainlink CCIP (5400-5599) - 200 VMIDs
- **5400-5403**: Admin / Monitor / Relay (4 nodes)
- **5410-5429**: Commit DON (20 nodes)
- **5440-5459**: Execute DON (20 nodes)
- **5470-5476**: RMN (7 nodes)
- **5480-5599**: Reserved (more lanes / redundancy / scale; 120 VMIDs)
---
### Available / Buffer (5700-5999) - 300 VMIDs
- **5700-5999**: Reserved for future use / buffer space
---
### Fabric (6000-6099) - 100 VMIDs
- **6000**: Fabric core (1 node)
- **6001-6099**: peers / orderers / HA (99 VMIDs)
---
### FireFly (6200-6299) - 100 VMIDs
- **6200**: FireFly core (1 node)
- **6201-6299**: connectors / plugins / HA (99 VMIDs)
---
### Indy (6400-7399) - 1,000 VMIDs
- **6400**: Indy core (1 node)
- **6401-7399**: agents / trust anchors / HA / expansion (999 VMIDs)
---
### Sankofa / Phoenix / PanTel (7800-8999) - 1,200 VMIDs
- **7800**: Initial deployment (1 node)
- **7801-8999**: Reserved for expansion (1,199 VMIDs)
---
### Sovereign Cloud Band (10000-13999) - 4,000 VMIDs
**Domain**: SMOM / ICCC / DBIS / Absolute Realms
- **10000**: Initial deployment (1 node)
- **10001-13999**: Reserved for sovereign cloud expansion (3,999 VMIDs)
---
## Configuration Variables
All VMID ranges are defined in `config/proxmox.conf`:
```bash
VMID_VALIDATORS_START=1000 # Besu validators: 1000-1499
VMID_SENTRIES_START=1500 # Besu sentries: 1500-2499
VMID_RPC_START=2500 # Besu RPC: 2500-3499
VMID_ARCHIVE_START=3500 # Besu archive/telemetry: 3500-4299
VMID_BESU_RESERVED_START=4300 # Besu reserved: 4300-4999
VMID_EXPLORER_START=5000 # Blockscout: 5000-5099
VMID_CACTI_START=5200 # Cacti: 5200-5299
VMID_CCIP_START=5400 # Chainlink CCIP: 5400-5599
VMID_BUFFER_START=5700 # Buffer: 5700-5999
VMID_FABRIC_START=6000 # Fabric: 6000-6099
VMID_FIREFLY_START=6200 # Firefly: 6200-6299
VMID_INDY_START=6400 # Indy: 6400-7399
VMID_SANKOFA_START=7800 # Sankofa/Phoenix/PanTel: 7800-8999
VMID_SOVEREIGN_CLOUD_START=10000 # Sovereign Cloud: 10000-13999
```
---
## Allocation Summary
| Category | Start | End | Total | Initial | Available | % Available |
|----------|-------|-----|-------|---------|-----------|------------|
| Besu Network | 1000 | 4999 | 4,000 | ~17 | ~3,983 | 99.6% |
| Blockscout | 5000 | 5099 | 100 | 1 | 99 | 99.0% |
| Cacti | 5200 | 5299 | 100 | 1 | 99 | 99.0% |
| Chainlink CCIP | 5400 | 5599 | 200 | 1+ | 199 | 99.5% |
| Buffer | 5700 | 5999 | 300 | 0 | 300 | 100% |
| Fabric | 6000 | 6099 | 100 | 1 | 99 | 99.0% |
| FireFly | 6200 | 6299 | 100 | 1 | 99 | 99.0% |
| Indy | 6400 | 7399 | 1,000 | 1 | 999 | 99.9% |
| Sankofa/Phoenix/PanTel | 7800 | 8999 | 1,200 | 1 | 1,199 | 99.9% |
| Sovereign Cloud | 10000 | 13999 | 4,000 | 1 | 3,999 | 99.975% |
| **TOTAL** | **1000** | **13999** | **11,000** | **~26** | **~10,974** | **99.8%** |
---
## Key Features
**Non-overlapping ranges** - Clear separation between all domains
**Sovereign-scale capacity** - 4,000 VMIDs for Besu network expansion
**Future-proof** - Large buffers and reserved ranges
**Modular design** - Each service has dedicated range
**Sovereign Cloud Band** - 4,000 VMIDs for SMOM/ICCC/DBIS/Absolute Realms
---
## Migration Notes
**Previous Allocations**:
- Validators: 106-110, 1100-1104 → **1000-1004**
- Sentries: 111-114, 1110-1113 → **1500-1503**
- RPC: 115-117, 1120-1122 → **2500-2502**
- Blockscout: 2000, 250 → **5000**
- Cacti: 2400, 261 → **5200**
- CCIP: 3200 → **5400**
- Fabric: 4500, 262 → **6000**
- Firefly: 4700, 260 → **6200**
- Indy: 8000, 263 → **6400**
**New Additions**:
- Buffer: 5700-5999 (300 VMIDs)
- Sankofa/Phoenix/PanTel: 7800-8999 (1,200 VMIDs)
- Sovereign Cloud Band: 10000-13999 (4,000 VMIDs)