Skip to content

fix(build): CGO_ENABLED=1 for go-sqlite3 (unblocks /v1/mpc/wallets)#4

Merged
hanzo-dev merged 2 commits intomainfrom
feat-cgo-enabled
May 5, 2026
Merged

fix(build): CGO_ENABLED=1 for go-sqlite3 (unblocks /v1/mpc/wallets)#4
hanzo-dev merged 2 commits intomainfrom
feat-cgo-enabled

Conversation

@hanzo-dev
Copy link
Copy Markdown
Member

Fixes wallet HTTP API 503 caused by mattn/go-sqlite3 not registering with CGO=0. Static external linker keeps binary scratch-runtime compatible.

hanzo-dev added 2 commits May 3, 2026 14:07
The recorded go.sum hash for github.com/luxfi/edwards25519@v0.1.0 was
stale — the proxy now serves go.mod content (`module github.com/luxfi/
edwards25519\n\ngo 1.21\n`) that hashes to MBoV+bPE..., while go.sum had
the older tFuuyXvI... value (matching whatever go.mod content was first
published, evidently `module github.com/agl/ed25519`). Result: every Go
build in the workspace, including ringtail's dkg tests, errored with a
checksum mismatch SECURITY ERROR.

Fix: remove the two stale edwards25519 lines and re-run go mod tidy so
the current proxy content is re-pinned. New hashes:

  h1:YPoT831TZMslvNyy/KuTtpHi4BGZWgpwak06RCaYLzo=        (zip)
  h1:MBoV+bPEz1tSMADPMSUaYdZ+agY3syG8B6z7RmJBH0A=        (mod)

Verified: `cd ~/work/lux/ringtail && go test ./dkg/...` passes
TestDKG_2of3, TestDKG_3of5, TestDKG_InvalidParams, TestDKG_MissingData
(env override GOENV=/dev/null + GOPROXY=https://proxy.golang.org,direct
to bypass the unrelated GONOPROXY=hanzoai/* setting in the user's global
go env that prevents the proxy from serving the cached but git-deleted
hanzoai/xorm-adapter@v3.0.1 — that's a separate workspace-config issue,
not a go.sum corruption).
The /v1/mpc/wallets HTTP API was 503'ing because CGO_ENABLED=0
left mattn/go-sqlite3 unregistered, so the wallet tables couldn't
open. Workaround was seeding wallets into TA's user_wallets table.

Switch to CGO=1 with statically-linked external linker so the binary
still runs in a scratch/alpine runtime without sqlite-libs at runtime.
@hanzo-dev hanzo-dev merged commit 2cefa0b into main May 5, 2026
1 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant