mirror of
https://github.com/ruvnet/RuVector.git
synced 2026-05-23 04:27:11 +00:00
- Add Pi-Key WASM cryptographic module with mathematical constant sizing - Pi-sized (314 bits/40 bytes) identity keys - Euler-sized (271 bits/34 bytes) session keys - Phi-sized (161 bits/21 bytes) genesis keys - Ed25519 signing + AES-256-GCM encryption - Add comprehensive TypeScript lifecycle simulation (sim/) - 6 source files, 1,420 lines - Validates all 4 phases: Genesis → Growth → Maturation → Independence - Economic sustainability and phase transition testing - Performance optimizations - FxHashMap for 30-50% faster lookups in evolution/mod.rs - VecDeque for O(1) front removal - Batched Q-learning updates in security/mod.rs - Fixed borrow checker error in process_batch_updates() - Add benchmarks and documentation - BENCHMARKS.md with performance metrics - PERFORMANCE_OPTIMIZATIONS.md with details - docs/FINAL_REPORT.md comprehensive summary 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
50 lines
1.5 KiB
Bash
Executable file
50 lines
1.5 KiB
Bash
Executable file
#!/bin/bash
|
|
# Quick test of the simulation with reduced node count
|
|
|
|
echo "Running quick simulation test (20K nodes)..."
|
|
|
|
# Temporarily modify target to 20K for quick test
|
|
node --loader ts-node/esm -e "
|
|
import { Network } from './src/network.js';
|
|
import { MetricsCollector } from './src/metrics.js';
|
|
import { PhaseManager } from './src/phases.js';
|
|
import { ReportGenerator } from './src/report.js';
|
|
import { NetworkPhase } from './src/network.js';
|
|
|
|
const network = new Network({
|
|
genesisNodeCount: 50,
|
|
targetNodeCount: 20000,
|
|
nodesPerTick: 100,
|
|
taskGenerationRate: 5,
|
|
baseTaskReward: 1.0,
|
|
connectionCost: 0.5,
|
|
maxConnectionsPerNode: 50,
|
|
});
|
|
|
|
const metrics = new MetricsCollector(network);
|
|
const phaseManager = new PhaseManager(network, metrics);
|
|
const reportGenerator = new ReportGenerator(network, metrics);
|
|
|
|
console.log('Initializing network...');
|
|
network.initialize();
|
|
metrics.initialize();
|
|
|
|
let lastUpdate = 0;
|
|
while (network.cells.size < 20000 && network.currentTick < 5000) {
|
|
network.tick();
|
|
metrics.collect();
|
|
phaseManager.checkTransition();
|
|
|
|
if (network.currentTick - lastUpdate >= 50) {
|
|
const stats = network.getStats();
|
|
console.log(\`Tick \${network.currentTick}: \${stats.nodeCount} nodes | Phase: \${network.currentPhase}\`);
|
|
lastUpdate = network.currentTick;
|
|
}
|
|
}
|
|
|
|
metrics.finalizeCurrent();
|
|
console.log('\\nGenerating report...');
|
|
reportGenerator.printSummary();
|
|
reportGenerator.saveReport('/workspaces/ruvector/examples/edge-net/sim/test-report.json');
|
|
console.log('✅ Quick test complete!');
|
|
"
|