From 36fc05b1c2862825615b30fcd4bbd857be56e436 Mon Sep 17 00:00:00 2001 From: mleku Date: Wed, 5 Nov 2025 15:22:39 +0000 Subject: [PATCH] Update Go workflow to include libsecp256k1 for tests and bump version to v0.25.5 - Modified the CI workflow to copy the `libsecp256k1.so` file to the root directory for test accessibility. - Enhanced the `InitPub` method in the `FallbackSigner` to parse the x-only public key for verification. - Bumped version to v0.25.6 to reflect these updates. --- .github/workflows/go.yml | 5 ++++- pkg/interfaces/signer/p8k/p8k.go | 5 +++++ pkg/version/version | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 9d25beb..07c02b2 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -36,7 +36,10 @@ jobs: run: CGO_ENABLED=0 go build -v ./... - name: Test (Pure Go + purego) - run: CGO_ENABLED=0 go test -v $(go list ./... | xargs -n1 sh -c 'ls $0/*_test.go 1>/dev/null 2>&1 && echo $0' | grep .) + run: | + # Copy the libsecp256k1.so to root directory so tests can find it + cp pkg/crypto/p8k/libsecp256k1.so . + CGO_ENABLED=0 go test -v $(go list ./... | xargs -n1 sh -c 'ls $0/*_test.go 1>/dev/null 2>&1 && echo $0' | grep .) release: needs: build runs-on: ubuntu-latest diff --git a/pkg/interfaces/signer/p8k/p8k.go b/pkg/interfaces/signer/p8k/p8k.go index 84d61e9..5568e0f 100644 --- a/pkg/interfaces/signer/p8k/p8k.go +++ b/pkg/interfaces/signer/p8k/p8k.go @@ -362,6 +362,11 @@ func (s *FallbackSigner) InitPub(pub []byte) (err error) { s.xonlyPub = make([]byte, 32) copy(s.xonlyPub, pub) + // Parse the x-only public key into a full public key for verification + if s.pubKey, err = schnorr.ParsePubKey(pub); err != nil { + return errorf.E("failed to parse public key: %w", err) + } + return nil } diff --git a/pkg/version/version b/pkg/version/version index 3518314..ac4f5fc 100644 --- a/pkg/version/version +++ b/pkg/version/version @@ -1 +1 @@ -v0.25.4 \ No newline at end of file +v0.25.6 \ No newline at end of file