mirror of
https://github.com/hanzoai/mpc.git
synced 2026-10-30 19:45:28 +00:00
This commit adds complete multi-party computation (MPC) threshold signing for multiple cryptographic protocols: CGGMP21 (ECDSA/secp256k1): - Key generation for Bitcoin/Ethereum/EVM chains - Threshold signing with t-of-n security - Recovery byte calculation for Ethereum compatibility FROST/Taproot (EdDSA/BIP-340): - EdDSA key generation for Solana/Sui/Polkadot - BIP-340 compatible Schnorr signatures (64 bytes) - CBOR serialization for TaprootConfig crypto types LSS (Linear Secret Sharing): - Dynamic resharing support (change participants) - ECDSA signing with blinding protocol - Protocol adapter for unified interface Key fixes: - Use MarshalBinary/UnmarshalBinary for protocol messages - CBOR serialization for FROST TaprootConfig (not JSON) - Correct type assertion for taproot.Signature ([]byte) - Sorted party IDs for deterministic ordering E2E tests pass for both ECDSA and EdDSA signing.
59 lines
2.0 KiB
Bash
Executable File
59 lines
2.0 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
echo "╔═══════════════════════════════════════════════════════════════╗"
|
|
echo "║ 🚀 Lux MPC Cluster Status ║"
|
|
echo "╚═══════════════════════════════════════════════════════════════╝"
|
|
echo ""
|
|
|
|
# Check services
|
|
echo "📡 Infrastructure Services:"
|
|
echo -n " NATS: "
|
|
if curl -s http://localhost:8222/varz > /dev/null 2>&1; then
|
|
echo "✅ Running (http://localhost:8222)"
|
|
else
|
|
echo "❌ Not running"
|
|
fi
|
|
|
|
echo -n " Consul: "
|
|
if curl -s http://localhost:8500/v1/agent/self > /dev/null 2>&1; then
|
|
echo "✅ Running (http://localhost:8500)"
|
|
else
|
|
echo "❌ Not running"
|
|
fi
|
|
|
|
echo ""
|
|
echo "🖥️ MPC Nodes (Environment: local):"
|
|
|
|
# Check each node
|
|
for i in 0 1 2; do
|
|
if ps aux | grep -v grep | grep -q "lux-mpc start --name node$i"; then
|
|
echo " lux-local-node$i: ✅ Running"
|
|
else
|
|
echo " lux-local-node$i: ❌ Not running"
|
|
fi
|
|
done
|
|
|
|
echo ""
|
|
echo "📊 Cluster Readiness:"
|
|
# Get latest status from logs
|
|
READY_COUNT=$(grep -h "readyPeers=" logs/node*.log 2>/dev/null | tail -1 | grep -o "readyPeers=\[[0-9]\]" | grep -o "[0-9]")
|
|
TOTAL_COUNT=$(grep -h "totalPeers=" logs/node*.log 2>/dev/null | tail -1 | grep -o "totalPeers=\[[0-9]\]" | grep -o "[0-9]")
|
|
|
|
if [ -n "$READY_COUNT" ] && [ -n "$TOTAL_COUNT" ]; then
|
|
echo " Ready Peers: $READY_COUNT/$TOTAL_COUNT"
|
|
echo " Threshold: 2 (requires 3 nodes for signing)"
|
|
if [ "$READY_COUNT" -ge 3 ]; then
|
|
echo " Status: ✅ Ready for operations"
|
|
else
|
|
echo " Status: ⏳ Waiting for nodes..."
|
|
fi
|
|
else
|
|
echo " Status: ⏳ Initializing..."
|
|
fi
|
|
|
|
echo ""
|
|
echo "📝 Commands:"
|
|
echo " View logs: tail -f logs/*.log"
|
|
echo " Stop cluster: make stop-local"
|
|
echo " Kill nodes: pkill lux-mpc"
|
|
echo "" |