mirror of
https://github.com/luxfi/metric.git
synced 2026-07-27 04:12:44 +00:00
579 lines
19 KiB
HTML
579 lines
19 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>Lux Network - Post-Quantum Metrics Dashboard</title>
|
|
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
|
|
<style>
|
|
* {
|
|
margin: 0;
|
|
padding: 0;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
body {
|
|
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
|
|
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
|
min-height: 100vh;
|
|
padding: 20px;
|
|
}
|
|
|
|
.container {
|
|
max-width: 1400px;
|
|
margin: 0 auto;
|
|
}
|
|
|
|
.header {
|
|
background: rgba(255, 255, 255, 0.95);
|
|
border-radius: 12px;
|
|
padding: 30px;
|
|
margin-bottom: 30px;
|
|
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
|
|
}
|
|
|
|
.header h1 {
|
|
color: #333;
|
|
font-size: 32px;
|
|
margin-bottom: 10px;
|
|
}
|
|
|
|
.header .subtitle {
|
|
color: #666;
|
|
font-size: 16px;
|
|
}
|
|
|
|
.status-bar {
|
|
display: flex;
|
|
gap: 20px;
|
|
margin-top: 20px;
|
|
}
|
|
|
|
.status-item {
|
|
flex: 1;
|
|
padding: 15px;
|
|
background: #f8f9fa;
|
|
border-radius: 8px;
|
|
text-align: center;
|
|
}
|
|
|
|
.status-item .label {
|
|
color: #666;
|
|
font-size: 12px;
|
|
text-transform: uppercase;
|
|
letter-spacing: 1px;
|
|
}
|
|
|
|
.status-item .value {
|
|
color: #333;
|
|
font-size: 24px;
|
|
font-weight: bold;
|
|
margin-top: 5px;
|
|
}
|
|
|
|
.status-item.active {
|
|
background: #d4edda;
|
|
border: 1px solid #c3e6cb;
|
|
}
|
|
|
|
.metrics-grid {
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
|
|
gap: 20px;
|
|
margin-bottom: 30px;
|
|
}
|
|
|
|
.metric-card {
|
|
background: rgba(255, 255, 255, 0.95);
|
|
border-radius: 12px;
|
|
padding: 20px;
|
|
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
|
|
}
|
|
|
|
.metric-card h3 {
|
|
color: #333;
|
|
font-size: 18px;
|
|
margin-bottom: 15px;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 10px;
|
|
}
|
|
|
|
.metric-card .icon {
|
|
width: 24px;
|
|
height: 24px;
|
|
background: linear-gradient(135deg, #667eea, #764ba2);
|
|
border-radius: 50%;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
color: white;
|
|
font-size: 12px;
|
|
}
|
|
|
|
.chart-container {
|
|
position: relative;
|
|
height: 250px;
|
|
}
|
|
|
|
.performance-table {
|
|
width: 100%;
|
|
border-collapse: collapse;
|
|
}
|
|
|
|
.performance-table th,
|
|
.performance-table td {
|
|
padding: 12px;
|
|
text-align: left;
|
|
border-bottom: 1px solid #e0e0e0;
|
|
}
|
|
|
|
.performance-table th {
|
|
background: #f8f9fa;
|
|
font-weight: 600;
|
|
color: #666;
|
|
font-size: 12px;
|
|
text-transform: uppercase;
|
|
}
|
|
|
|
.performance-table td {
|
|
color: #333;
|
|
font-size: 14px;
|
|
}
|
|
|
|
.performance-table .good {
|
|
color: #28a745;
|
|
}
|
|
|
|
.performance-table .warning {
|
|
color: #ffc107;
|
|
}
|
|
|
|
.performance-table .bad {
|
|
color: #dc3545;
|
|
}
|
|
|
|
.progress-bar {
|
|
width: 100%;
|
|
height: 20px;
|
|
background: #e0e0e0;
|
|
border-radius: 10px;
|
|
overflow: hidden;
|
|
margin-top: 10px;
|
|
}
|
|
|
|
.progress-fill {
|
|
height: 100%;
|
|
background: linear-gradient(90deg, #667eea, #764ba2);
|
|
border-radius: 10px;
|
|
transition: width 0.3s ease;
|
|
}
|
|
|
|
.legend {
|
|
display: flex;
|
|
gap: 20px;
|
|
margin-top: 15px;
|
|
flex-wrap: wrap;
|
|
}
|
|
|
|
.legend-item {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 5px;
|
|
font-size: 12px;
|
|
color: #666;
|
|
}
|
|
|
|
.legend-color {
|
|
width: 12px;
|
|
height: 12px;
|
|
border-radius: 2px;
|
|
}
|
|
|
|
@keyframes pulse {
|
|
0% { opacity: 1; }
|
|
50% { opacity: 0.5; }
|
|
100% { opacity: 1; }
|
|
}
|
|
|
|
.live-indicator {
|
|
display: inline-block;
|
|
width: 8px;
|
|
height: 8px;
|
|
background: #28a745;
|
|
border-radius: 50%;
|
|
margin-left: 10px;
|
|
animation: pulse 2s infinite;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div class="container">
|
|
<div class="header">
|
|
<h1>Post-Quantum Metrics Dashboard <span class="live-indicator"></span></h1>
|
|
<div class="subtitle">Real-time monitoring of Quasar consensus and PQ cryptography operations</div>
|
|
|
|
<div class="status-bar">
|
|
<div class="status-item active">
|
|
<div class="label">Quasar Status</div>
|
|
<div class="value">ACTIVE</div>
|
|
</div>
|
|
<div class="status-item">
|
|
<div class="label">PQ Finality</div>
|
|
<div class="value" id="pq-finality">98.7%</div>
|
|
</div>
|
|
<div class="status-item">
|
|
<div class="label">Validators</div>
|
|
<div class="value" id="validator-count">24/24</div>
|
|
</div>
|
|
<div class="status-item">
|
|
<div class="label">Block Height</div>
|
|
<div class="value" id="block-height">1,234,567</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="metrics-grid">
|
|
<!-- Signature Operations Chart -->
|
|
<div class="metric-card">
|
|
<h3>
|
|
<span class="icon">📊</span>
|
|
Signature Operations (per second)
|
|
</h3>
|
|
<div class="chart-container">
|
|
<canvas id="signatureChart"></canvas>
|
|
</div>
|
|
<div class="legend">
|
|
<div class="legend-item">
|
|
<div class="legend-color" style="background: #667eea;"></div>
|
|
<span>BLS</span>
|
|
</div>
|
|
<div class="legend-item">
|
|
<div class="legend-color" style="background: #764ba2;"></div>
|
|
<span>ML-DSA</span>
|
|
</div>
|
|
<div class="legend-item">
|
|
<div class="legend-color" style="background: #f093fb;"></div>
|
|
<span>Corona</span>
|
|
</div>
|
|
<div class="legend-item">
|
|
<div class="legend-color" style="background: #4facfe;"></div>
|
|
<span>Verkle</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Verification Time Chart -->
|
|
<div class="metric-card">
|
|
<h3>
|
|
<span class="icon">⏱️</span>
|
|
Verification Times (ms)
|
|
</h3>
|
|
<div class="chart-container">
|
|
<canvas id="verificationChart"></canvas>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Gas Usage Chart -->
|
|
<div class="metric-card">
|
|
<h3>
|
|
<span class="icon">⛽</span>
|
|
Gas Consumption
|
|
</h3>
|
|
<div class="chart-container">
|
|
<canvas id="gasChart"></canvas>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Network Throughput -->
|
|
<div class="metric-card">
|
|
<h3>
|
|
<span class="icon">🔄</span>
|
|
Network Throughput
|
|
</h3>
|
|
<div class="chart-container">
|
|
<canvas id="throughputChart"></canvas>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Performance Table -->
|
|
<div class="metric-card">
|
|
<h3>
|
|
<span class="icon">📈</span>
|
|
Algorithm Performance Metrics
|
|
</h3>
|
|
<table class="performance-table">
|
|
<thead>
|
|
<tr>
|
|
<th>Algorithm</th>
|
|
<th>Operations/sec</th>
|
|
<th>Avg Latency</th>
|
|
<th>Success Rate</th>
|
|
<th>Gas Cost</th>
|
|
<th>Security Level</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td><strong>BLS12-381</strong></td>
|
|
<td class="good">12,450</td>
|
|
<td class="good">0.08 ms</td>
|
|
<td class="good">99.99%</td>
|
|
<td>5,000</td>
|
|
<td>Level 2</td>
|
|
</tr>
|
|
<tr>
|
|
<td><strong>ML-DSA-65</strong></td>
|
|
<td class="good">8,320</td>
|
|
<td class="good">0.12 ms</td>
|
|
<td class="good">99.98%</td>
|
|
<td>10,000</td>
|
|
<td>Level 3</td>
|
|
</tr>
|
|
<tr>
|
|
<td><strong>SLH-DSA-128f</strong></td>
|
|
<td class="warning">2,150</td>
|
|
<td class="warning">0.47 ms</td>
|
|
<td class="good">99.95%</td>
|
|
<td>15,000</td>
|
|
<td>Level 5</td>
|
|
</tr>
|
|
<tr>
|
|
<td><strong>Corona (Hybrid)</strong></td>
|
|
<td class="good">6,780</td>
|
|
<td class="good">0.15 ms</td>
|
|
<td class="good">99.97%</td>
|
|
<td>15,000</td>
|
|
<td>Level 3</td>
|
|
</tr>
|
|
<tr>
|
|
<td><strong>Verkle Witness</strong></td>
|
|
<td class="good">18,500</td>
|
|
<td class="good">0.05 ms</td>
|
|
<td class="good">99.99%</td>
|
|
<td>3,000</td>
|
|
<td>Level 3</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<!-- Consensus Health -->
|
|
<div class="metric-card">
|
|
<h3>
|
|
<span class="icon">💚</span>
|
|
Quasar Consensus Health
|
|
</h3>
|
|
<div style="display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-top: 20px;">
|
|
<div>
|
|
<div style="color: #666; font-size: 14px;">Validator Participation</div>
|
|
<div class="progress-bar">
|
|
<div class="progress-fill" style="width: 92%;"></div>
|
|
</div>
|
|
<div style="color: #333; font-size: 12px; margin-top: 5px;">22/24 validators active</div>
|
|
</div>
|
|
<div>
|
|
<div style="color: #666; font-size: 14px;">PQ Finality Achievement</div>
|
|
<div class="progress-bar">
|
|
<div class="progress-fill" style="width: 98.7%;"></div>
|
|
</div>
|
|
<div style="color: #333; font-size: 12px; margin-top: 5px;">98.7% blocks PQ-final</div>
|
|
</div>
|
|
<div>
|
|
<div style="color: #666; font-size: 14px;">Witness Compression Rate</div>
|
|
<div class="progress-bar">
|
|
<div class="progress-fill" style="width: 88%;"></div>
|
|
</div>
|
|
<div style="color: #333; font-size: 12px; margin-top: 5px;">88% size reduction</div>
|
|
</div>
|
|
<div>
|
|
<div style="color: #666; font-size: 14px;">Network Synchronization</div>
|
|
<div class="progress-bar">
|
|
<div class="progress-fill" style="width: 100%;"></div>
|
|
</div>
|
|
<div style="color: #333; font-size: 12px; margin-top: 5px;">All nodes synchronized</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<script>
|
|
// Initialize charts
|
|
const chartOptions = {
|
|
responsive: true,
|
|
maintainAspectRatio: false,
|
|
plugins: {
|
|
legend: {
|
|
display: false
|
|
}
|
|
},
|
|
scales: {
|
|
y: {
|
|
beginAtZero: true
|
|
}
|
|
}
|
|
};
|
|
|
|
// Signature Operations Chart
|
|
const signatureCtx = document.getElementById('signatureChart').getContext('2d');
|
|
const signatureChart = new Chart(signatureCtx, {
|
|
type: 'line',
|
|
data: {
|
|
labels: Array(20).fill('').map((_, i) => `${20-i}s`),
|
|
datasets: [
|
|
{
|
|
label: 'BLS',
|
|
data: Array(20).fill(0).map(() => 12000 + Math.random() * 1000),
|
|
borderColor: '#667eea',
|
|
tension: 0.4
|
|
},
|
|
{
|
|
label: 'ML-DSA',
|
|
data: Array(20).fill(0).map(() => 8000 + Math.random() * 500),
|
|
borderColor: '#764ba2',
|
|
tension: 0.4
|
|
},
|
|
{
|
|
label: 'Corona',
|
|
data: Array(20).fill(0).map(() => 6500 + Math.random() * 500),
|
|
borderColor: '#f093fb',
|
|
tension: 0.4
|
|
},
|
|
{
|
|
label: 'Verkle',
|
|
data: Array(20).fill(0).map(() => 18000 + Math.random() * 1000),
|
|
borderColor: '#4facfe',
|
|
tension: 0.4
|
|
}
|
|
]
|
|
},
|
|
options: chartOptions
|
|
});
|
|
|
|
// Verification Time Chart
|
|
const verificationCtx = document.getElementById('verificationChart').getContext('2d');
|
|
const verificationChart = new Chart(verificationCtx, {
|
|
type: 'bar',
|
|
data: {
|
|
labels: ['BLS', 'ML-DSA', 'SLH-DSA', 'Corona', 'Verkle'],
|
|
datasets: [{
|
|
label: 'Average Verification Time',
|
|
data: [0.08, 0.12, 0.47, 0.15, 0.05],
|
|
backgroundColor: [
|
|
'rgba(102, 126, 234, 0.8)',
|
|
'rgba(118, 75, 162, 0.8)',
|
|
'rgba(240, 147, 251, 0.8)',
|
|
'rgba(79, 172, 254, 0.8)',
|
|
'rgba(40, 167, 69, 0.8)'
|
|
]
|
|
}]
|
|
},
|
|
options: {
|
|
...chartOptions,
|
|
scales: {
|
|
y: {
|
|
beginAtZero: true,
|
|
title: {
|
|
display: true,
|
|
text: 'Time (ms)'
|
|
}
|
|
}
|
|
}
|
|
}
|
|
});
|
|
|
|
// Gas Usage Chart
|
|
const gasCtx = document.getElementById('gasChart').getContext('2d');
|
|
const gasChart = new Chart(gasCtx, {
|
|
type: 'doughnut',
|
|
data: {
|
|
labels: ['BLS', 'ML-DSA', 'SLH-DSA', 'Corona', 'Verkle', 'Other'],
|
|
datasets: [{
|
|
data: [25, 30, 10, 20, 10, 5],
|
|
backgroundColor: [
|
|
'rgba(102, 126, 234, 0.8)',
|
|
'rgba(118, 75, 162, 0.8)',
|
|
'rgba(240, 147, 251, 0.8)',
|
|
'rgba(79, 172, 254, 0.8)',
|
|
'rgba(40, 167, 69, 0.8)',
|
|
'rgba(200, 200, 200, 0.8)'
|
|
]
|
|
}]
|
|
},
|
|
options: {
|
|
responsive: true,
|
|
maintainAspectRatio: false,
|
|
plugins: {
|
|
legend: {
|
|
display: true,
|
|
position: 'bottom'
|
|
}
|
|
}
|
|
}
|
|
});
|
|
|
|
// Network Throughput Chart
|
|
const throughputCtx = document.getElementById('throughputChart').getContext('2d');
|
|
const throughputChart = new Chart(throughputCtx, {
|
|
type: 'line',
|
|
data: {
|
|
labels: Array(20).fill('').map((_, i) => `${20-i}s`),
|
|
datasets: [
|
|
{
|
|
label: 'TPS',
|
|
data: Array(20).fill(0).map(() => 4500 + Math.random() * 500),
|
|
borderColor: '#667eea',
|
|
backgroundColor: 'rgba(102, 126, 234, 0.1)',
|
|
fill: true,
|
|
tension: 0.4
|
|
}
|
|
]
|
|
},
|
|
options: {
|
|
...chartOptions,
|
|
scales: {
|
|
y: {
|
|
beginAtZero: true,
|
|
title: {
|
|
display: true,
|
|
text: 'Transactions per Second'
|
|
}
|
|
}
|
|
}
|
|
}
|
|
});
|
|
|
|
// Update data periodically
|
|
function updateData() {
|
|
// Update block height
|
|
const blockHeight = document.getElementById('block-height');
|
|
const currentHeight = parseInt(blockHeight.textContent.replace(/,/g, ''));
|
|
blockHeight.textContent = (currentHeight + 1).toLocaleString();
|
|
|
|
// Update signature chart
|
|
signatureChart.data.datasets.forEach(dataset => {
|
|
dataset.data.shift();
|
|
const base = dataset.label === 'BLS' ? 12000 :
|
|
dataset.label === 'ML-DSA' ? 8000 :
|
|
dataset.label === 'Corona' ? 6500 : 18000;
|
|
dataset.data.push(base + Math.random() * 1000);
|
|
});
|
|
signatureChart.update('none');
|
|
|
|
// Update throughput chart
|
|
throughputChart.data.datasets[0].data.shift();
|
|
throughputChart.data.datasets[0].data.push(4500 + Math.random() * 500);
|
|
throughputChart.update('none');
|
|
|
|
// Update PQ finality
|
|
const finality = document.getElementById('pq-finality');
|
|
const newFinality = (98 + Math.random() * 2).toFixed(1);
|
|
finality.textContent = newFinality + '%';
|
|
}
|
|
|
|
// Update every 2 seconds
|
|
setInterval(updateData, 2000);
|
|
</script>
|
|
</body>
|
|
</html> |