fix(build): CGO_ENABLED=1 for go-sqlite3 (unblocks /v1/mpc/wallets)#4
Merged
fix(build): CGO_ENABLED=1 for go-sqlite3 (unblocks /v1/mpc/wallets)#4
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes wallet HTTP API 503 caused by mattn/go-sqlite3 not registering with CGO=0. Static external linker keeps binary scratch-runtime compatible.