Files
zeekay 19b49809fd Implement threshold MPC signing with CGGMP21, FROST, and LSS protocols
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.
2026-01-24 23:41:43 -08:00

51 lines
1.3 KiB
Makefile

.PHONY: test setup clean deps
# Default target
test: deps setup
@echo "Running E2E tests..."
go test -v -timeout=10m ./...
# Setup test environment
setup:
@echo "๐Ÿ”ง Setting up test environment..."
@if ! command -v mpc >/dev/null 2>&1; then \
echo "โŒ mpc binary not found in PATH. Please run 'make' in the root directory first."; \
exit 1; \
fi
@if ! command -v mpc-cli >/dev/null 2>&1; then \
echo "โŒ mpc-cli binary not found in PATH. Please run 'make' in the root directory first."; \
exit 1; \
fi
@echo "โœ… Binaries found"
# Install dependencies
deps:
@echo "๐Ÿ“ฆ Installing dependencies..."
go mod tidy
go mod download
# Clean up test artifacts
clean:
@echo "๐Ÿงน Cleaning up test artifacts..."
rm -rf test_db/
rm -rf test_node*/
rm -f test_event_initiator.*
rm -rf logs
rm -f config.test.yaml
docker compose -f docker-compose.test.yaml down --remove-orphans 2>/dev/null || true
# Quick test (skip setup)
test-quick:
@echo "โšก Running quick E2E tests..."
go test -v -timeout=10m ./...
# Help
help:
@echo "Available targets:"
@echo " test - Run E2E tests with full setup"
@echo " test-quick - Run E2E tests without setup"
@echo " setup - Setup test environment"
@echo " deps - Install dependencies"
@echo " clean - Clean up test artifacts"
@echo " help - Show this help message"