Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 10 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
branches: ["*"]

env:
GO_VERSION: "1.25.8"
GO_VERSION: "1.27.3"

jobs:
test:
Expand Down Expand Up @@ -50,9 +50,9 @@ jobs:
cache: true

- name: Run golangci-lint
uses: golangci/golangci-lint-action@v6
uses: golangci/golangci-lint-action@v9
with:
version: latest
version: v2.15.0
install-mode: goinstall
args: --timeout=5m

Expand Down Expand Up @@ -89,7 +89,8 @@ jobs:
govulncheck -format=sarif ./... > govulncheck-results.sarif

govulncheck -json ./... > vuln.json
count=$(jq '[.[] | select(.finding != null and .finding.trace != null)] | length' vuln.json || echo 0)
# -json emits a stream of objects; count unique OSVs whose vulnerable symbol is actually called
count=$(jq -n '[inputs | select(.finding.trace[0].function != null) | .finding.osv] | unique | length' vuln.json || echo 0)
echo "Found $count vulnerabilities"

if [ "$count" -gt 0 ]; then
Expand All @@ -99,11 +100,13 @@ jobs:
fi
continue-on-error: true

- name: Clean SARIF file (remove duplicate tags)
- name: Clean SARIF file (remove duplicate tags and stacks)
if: always()
run: |
# Remove duplicate tags from SARIF rules to fix validation errors
jq '(.runs[]?.tool.driver.rules[]?.properties.tags) |= unique' \
# SARIF requires unique items; govulncheck can emit duplicate tags, stacks and codeFlows
jq '(.runs[]?.tool.driver.rules[]?.properties.tags) |= unique
| (.runs[]?.results[]? | select(.stacks) | .stacks) |= unique
| (.runs[]?.results[]? | select(.codeFlows) | .codeFlows) |= unique' \
govulncheck-results.sarif > govulncheck-results-clean.sarif
mv govulncheck-results-clean.sarif govulncheck-results.sarif
echo "✅ Cleaned govulncheck SARIF file"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/e2e-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
branches: [master]

env:
GO_VERSION: "1.25.8"
GO_VERSION: "1.27.3"
CGO_ENABLED: 0
DOCKER_BUILDKIT: 1
GO_BUILD_FLAGS: -trimpath -ldflags="-s -w"
Expand Down
28 changes: 28 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
version: "2"

linters:
settings:
staticcheck:
checks:
# staticcheck's defaults
- all
- -ST1000
- -ST1003
- -ST1016
- -ST1020
- -ST1021
- -ST1022
# Capitalised error strings predate v2's merged stylecheck; not enforced yet
- -ST1005
exclusions:
# Roughly the default exclusions golangci-lint v1 applied
presets:
- comments
- common-false-positives
- legacy
- std-error-handling
rules:
# Go 1.26 deprecated ecdsa.PublicKey.X/Y, but the stdlib replacements only support
# NIST curves; tss-lib and btcec keys on secp256k1/Ed25519 still expose raw coordinates
- linters: [staticcheck]
text: "SA1019: .*\\.(X|Y) has been deprecated"
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.25 AS builder
FROM golang:1.27.3 AS builder

ARG TARGETOS
ARG TARGETARCH
Expand Down
2 changes: 1 addition & 1 deletion INSTALLATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

Before starting, ensure you have:

- **Go** 1.25.0+ installed: [Install Go here](https://go.dev/doc/install)
- **Go** 1.27.3+ installed: [Install Go here](https://go.dev/doc/install)
- **NATS** server running
- **Consul** server running

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<p><img title="fystack logo" src="https://avatars.githubusercontent.com/u/149689344?s=400&u=13bed818667eefccd78ca4b4207d088eeb4f6110&v=4" width="320" height="320"></p>
<p><a href="https://t.me/+9AtC0z8sS79iZjFl">Join our Telegram community to discuss MPCIUM and Web3 cyber security!</a></p>

[![Go Version](https://img.shields.io/badge/Go-v1.25+-00ADD8?logo=go&style=for-the-badge)](https://go.dev/)
[![Go Version](https://img.shields.io/badge/Go-v1.27+-00ADD8?logo=go&style=for-the-badge)](https://go.dev/)
[![License](https://img.shields.io/github/license/fystack/mpcium?style=for-the-badge)](./LICENSE)
[![Go Report Card](https://goreportcard.com/badge/github.com/fystack/mpcium?style=for-the-badge)](https://goreportcard.com/report/github.com/fystack/mpcium)
[![Version](https://img.shields.io/github/v/release/fystack/mpcium?label=version&logo=semantic-release&style=for-the-badge)](https://github.com/fystack/mpcium/releases)
Expand Down
34 changes: 17 additions & 17 deletions cmd/mpcium-cli/benchmark.go
Original file line number Diff line number Diff line change
Expand Up @@ -829,27 +829,27 @@ func generateBenchmarkReport(operationType string, result BenchmarkResult) strin

report.WriteString("\n")
report.WriteString("===============================\n")
report.WriteString(fmt.Sprintf("%s BENCHMARK RESULTS SUMMARY\n", strings.ToUpper(operationType)))
fmt.Fprintf(&report, "%s BENCHMARK RESULTS SUMMARY\n", strings.ToUpper(operationType))
report.WriteString("===============================\n")
report.WriteString(fmt.Sprintf("Timestamp: %s\n", time.Now().Format(time.RFC3339)))
report.WriteString(fmt.Sprintf("Operation Type: %s\n", operationType))
report.WriteString(fmt.Sprintf("Total benchmark time: %v\n", result.TotalTime))
report.WriteString(fmt.Sprintf("Total batches sent: %d\n", result.TotalBatches))
report.WriteString(fmt.Sprintf("Total requests sent: %d\n", result.TotalOperations))
report.WriteString(fmt.Sprintf("Successful completions: %d\n", result.SuccessfulOps))
report.WriteString(fmt.Sprintf("Failed operations: %d\n", result.FailedOps))
report.WriteString(fmt.Sprintf("Success rate: %.2f%%\n", 100.0-result.ErrorRate))
report.WriteString(fmt.Sprintf("Error rate: %.2f%%\n", result.ErrorRate))
report.WriteString(fmt.Sprintf("Average operations per minute: %.2f\n", result.OperationsPerMin))
fmt.Fprintf(&report, "Timestamp: %s\n", time.Now().Format(time.RFC3339))
fmt.Fprintf(&report, "Operation Type: %s\n", operationType)
fmt.Fprintf(&report, "Total benchmark time: %v\n", result.TotalTime)
fmt.Fprintf(&report, "Total batches sent: %d\n", result.TotalBatches)
fmt.Fprintf(&report, "Total requests sent: %d\n", result.TotalOperations)
fmt.Fprintf(&report, "Successful completions: %d\n", result.SuccessfulOps)
fmt.Fprintf(&report, "Failed operations: %d\n", result.FailedOps)
fmt.Fprintf(&report, "Success rate: %.2f%%\n", 100.0-result.ErrorRate)
fmt.Fprintf(&report, "Error rate: %.2f%%\n", result.ErrorRate)
fmt.Fprintf(&report, "Average operations per minute: %.2f\n", result.OperationsPerMin)

if len(result.OperationTimes) > 0 {
report.WriteString(fmt.Sprintf("Average operation time: %v\n", result.AverageTime))
report.WriteString(fmt.Sprintf("Median operation time: %v\n", result.MedianTime))
fmt.Fprintf(&report, "Average operation time: %v\n", result.AverageTime)
fmt.Fprintf(&report, "Median operation time: %v\n", result.MedianTime)
}

report.WriteString("\n")
report.WriteString("------------------------------\n")
report.WriteString(fmt.Sprintf("%d REQUEST ANALYSIS\n", result.BatchSize))
fmt.Fprintf(&report, "%d REQUEST ANALYSIS\n", result.BatchSize)
report.WriteString("------------------------------\n")

if len(result.OperationTimes) >= result.BatchSize {
Expand All @@ -863,7 +863,7 @@ func generateBenchmarkReport(operationType string, result BenchmarkResult) strin
completedCount = result.BatchSize
}

report.WriteString(fmt.Sprintf("Completed from first %d: %d/%d\n", result.BatchSize, completedCount, result.BatchSize))
fmt.Fprintf(&report, "Completed from first %d: %d/%d\n", result.BatchSize, completedCount, result.BatchSize)

if len(firstNResults) > 0 {
var totalTime time.Duration
Expand All @@ -880,8 +880,8 @@ func generateBenchmarkReport(operationType string, result BenchmarkResult) strin
}
}

report.WriteString(fmt.Sprintf("Fastest (first %d): %v\n", result.BatchSize, minTime))
report.WriteString(fmt.Sprintf("Slowest (first %d): %v\n", result.BatchSize, maxTime))
fmt.Fprintf(&report, "Fastest (first %d): %v\n", result.BatchSize, minTime)
fmt.Fprintf(&report, "Slowest (first %d): %v\n", result.BatchSize, maxTime)
}
}

Expand Down
2 changes: 1 addition & 1 deletion cmd/mpcium-cli/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import "unicode"
func ContainsAtLeastNSpecial(s string, n int) bool {
count := 0
for _, r := range s {
if !(unicode.IsLetter(r) || unicode.IsDigit(r)) {
if !unicode.IsLetter(r) && !unicode.IsDigit(r) {
count++
if count >= n {
return true
Expand Down
2 changes: 1 addition & 1 deletion deployments/kubernetes/k8s-instruction.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ Both services can be deployed in the same Kubernetes cluster or externally. Exam

### Required Software (for pre-deployment setup)

- **Go 1.25+** (on your local machine for generating identities)
- **Go 1.27+** (on your local machine for generating identities)
- **mpcium-cli** binary (build from source or download release)
- **age** (for encrypted identity storage) - https://github.com/FiloSottile/age

Expand Down
6 changes: 3 additions & 3 deletions deployments/systemd/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Mpcium is a distributed threshold cryptographic system that requires multiple no

### Software Dependencies

- **Go 1.27.1** on all nodes
- **Go 1.27.3** on all nodes
- **Git** for source code management
- **jq** (used by `setup-config.sh verify` to check identity files; without it those checks are silently skipped)
- **systemd v250+** (required for `systemd-creds`)
Expand All @@ -36,10 +36,10 @@ Steps marked **(designated node)** are run **once**, on a single node (e.g. `nod

#### Step 1: Install Go (all nodes)

Download Go 1.27.1 (auto-detects `amd64` / `arm64`):
Download Go 1.27.3 (auto-detects `amd64` / `arm64`):

```bash
GO_VERSION=go1.27.1
GO_VERSION=go1.27.3
ARCH=$(dpkg --print-architecture) # amd64 or arm64
wget "https://go.dev/dl/${GO_VERSION}.linux-${ARCH}.tar.gz"

Expand Down
30 changes: 14 additions & 16 deletions e2e/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/fystack/mpcium/e2e

go 1.25.8
go 1.27.3

require (
github.com/bnb-chain/tss-lib/v3 v3.0.1
Expand All @@ -9,7 +9,7 @@ require (
github.com/google/uuid v1.6.0
github.com/hashicorp/consul/api v1.33.2
github.com/nats-io/nats.go v1.49.0
github.com/stretchr/testify v1.11.1
github.com/stretchr/testify v1.12.1
gopkg.in/yaml.v2 v2.4.0
)

Expand Down Expand Up @@ -40,15 +40,14 @@ require (
github.com/btcsuite/btcd/chaincfg/chainhash v1.1.0 // indirect
github.com/btcsuite/btcutil v1.0.2 // indirect
github.com/cespare/xxhash/v2 v2.3.0 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/decred/dcrd/crypto/rand v1.0.1 // indirect
github.com/decred/dcrd/dcrec/edwards/v2 v2.0.4 // indirect
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.4.0 // indirect
github.com/dgraph-io/ristretto/v2 v2.4.0 // indirect
github.com/dustin/go-humanize v1.0.1 // indirect
github.com/fatih/color v1.18.0 // indirect
github.com/fsnotify/fsnotify v1.9.0 // indirect
github.com/go-logr/logr v1.4.3 // indirect
github.com/go-logr/logr v1.4.4 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/go-viper/mapstructure/v2 v2.5.0 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
Expand All @@ -65,7 +64,7 @@ require (
github.com/hashicorp/serf v0.10.2 // indirect
github.com/ipfs/go-log v1.0.5 // indirect
github.com/ipfs/go-log/v2 v2.9.0 // indirect
github.com/klauspost/compress v1.18.4 // indirect
github.com/klauspost/compress v1.20.3 // indirect
github.com/mattn/go-colorable v0.1.14 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/mitchellh/go-homedir v1.1.0 // indirect
Expand All @@ -75,7 +74,6 @@ require (
github.com/otiai10/primes v0.4.0 // indirect
github.com/pelletier/go-toml/v2 v2.2.4 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/rs/zerolog v1.34.0 // indirect
github.com/sagikazarmark/locafero v0.12.0 // indirect
github.com/samber/lo v1.52.0 // indirect
Expand All @@ -85,20 +83,20 @@ require (
github.com/spf13/viper v1.21.0 // indirect
github.com/subosito/gotenv v1.6.0 // indirect
go.opentelemetry.io/auto/sdk v1.2.1 // indirect
go.opentelemetry.io/otel v1.39.0 // indirect
go.opentelemetry.io/otel/metric v1.39.0 // indirect
go.opentelemetry.io/otel/trace v1.39.0 // indirect
go.opentelemetry.io/otel v1.47.0 // indirect
go.opentelemetry.io/otel/log v1.47.0 // indirect
go.opentelemetry.io/otel/metric v1.47.0 // indirect
go.opentelemetry.io/otel/trace v1.47.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
go.uber.org/zap v1.27.1 // indirect
go.yaml.in/yaml/v3 v3.0.4 // indirect
golang.org/x/crypto v0.48.0 // indirect
go.yaml.in/yaml/v3 v3.0.5 // indirect
golang.org/x/crypto v0.58.0 // indirect
golang.org/x/exp v0.0.0-20260112195511-716be5621a96 // indirect
golang.org/x/net v0.49.0 // indirect
golang.org/x/sys v0.42.0 // indirect
golang.org/x/term v0.40.0 // indirect
golang.org/x/text v0.34.0 // indirect
golang.org/x/net v0.61.0 // indirect
golang.org/x/sys v0.49.0 // indirect
golang.org/x/term v0.47.0 // indirect
golang.org/x/text v0.43.0 // indirect
google.golang.org/protobuf v1.36.11 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)

replace github.com/fystack/mpcium => ../
Expand Down
Loading
Loading