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.
50 lines
1.4 KiB
Docker
50 lines
1.4 KiB
Docker
# Dockerfile for Go 1.23 compatibility
|
|
# This Dockerfile is used when Go 1.24.5 is not available
|
|
# It creates placeholder binaries and the correct container structure
|
|
|
|
FROM golang:1.23-alpine AS builder
|
|
|
|
RUN apk add --no-cache git make
|
|
|
|
WORKDIR /build
|
|
|
|
# Copy source code
|
|
COPY . .
|
|
|
|
# Note: Full build requires Go 1.24.5
|
|
# Creating placeholder binaries for Docker image structure
|
|
RUN echo '#!/bin/sh' > lux-mpc && \
|
|
echo 'echo "This binary requires Go 1.24.5 to build properly"' >> lux-mpc && \
|
|
echo 'echo "Please build locally with Go 1.24.5 and mount the binary"' >> lux-mpc && \
|
|
echo 'exit 1' >> lux-mpc && \
|
|
chmod +x lux-mpc && \
|
|
cp lux-mpc lux-mpc-cli && \
|
|
cp lux-mpc lux-mpc-bridge
|
|
|
|
# Runtime stage
|
|
FROM alpine:latest
|
|
|
|
RUN apk add --no-cache ca-certificates curl bash
|
|
|
|
WORKDIR /app
|
|
|
|
# Copy placeholder binaries
|
|
COPY --from=builder /build/lux-mpc /usr/local/bin/
|
|
COPY --from=builder /build/lux-mpc-cli /usr/local/bin/
|
|
COPY --from=builder /build/lux-mpc-bridge /usr/local/bin/
|
|
|
|
# Copy config templates
|
|
COPY config.yaml.template peers.json /app/
|
|
|
|
# Create data and log directories
|
|
RUN mkdir -p /data/mpc /app/logs /app/identity
|
|
|
|
# Expose ports
|
|
EXPOSE 6000 8080 9090
|
|
|
|
# Health check - will fail with placeholder binaries
|
|
HEALTHCHECK --interval=10s --timeout=3s --start-period=5s --retries=3 \
|
|
CMD curl -f http://localhost:8080/health || exit 1
|
|
|
|
# Default command
|
|
CMD ["lux-mpc", "start", "--config", "/app/config.yaml"] |