Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
199 commits
Select commit Hold shift + click to select a range
a588efa
feat: added universal_validator new structure in proto
0xNilesh Nov 5, 2025
e9ef971
feat: update msg_add_universal_validator proto for new structure
0xNilesh Nov 5, 2025
6ed6ddf
refactor: added generated protobuf
0xNilesh Nov 5, 2025
e2e3920
refactor: added generated protobuf in module types
0xNilesh Nov 5, 2025
cfeebf6
refactor: added universal_validator message types
0xNilesh Nov 6, 2025
b81c0d2
refactor: added network_info message types
0xNilesh Nov 6, 2025
276f2fd
refactor: updated msg_add_universal_validator msg
0xNilesh Nov 6, 2025
8f20746
feat: added generated protobuf
0xNilesh Nov 6, 2025
96b706f
feat: modified universal validator proto message to make it more scal…
0xNilesh Nov 6, 2025
0ede860
feat: added generated protobuf
0xNilesh Nov 6, 2025
a666430
feat: added generated protobuf
0xNilesh Nov 6, 2025
c8d46a7
refactor: added lifecyle_event message types
0xNilesh Nov 6, 2025
357403c
refactor: added lifecyle_info message types
0xNilesh Nov 6, 2025
31e4dec
refactor: added identity_info message types
0xNilesh Nov 6, 2025
0933c07
refactor: updated universal_validator validateBasic fn
0xNilesh Nov 6, 2025
883e800
refactor: updated universal_validator network info nomenclature
0xNilesh Nov 6, 2025
90d7526
add: inital db models
Aman035 Nov 6, 2025
8a66f9f
add: sudo network logic
Aman035 Nov 6, 2025
9a8abac
add: keyshare management
Aman035 Nov 6, 2025
bd9c0ee
initial code
Aman035 Nov 6, 2025
c5a42c2
refactor: fixed universal validator validate basic
0xNilesh Nov 7, 2025
819e67d
feat: modified the universal validator storage from a set of string t…
0xNilesh Nov 7, 2025
3dc6c7c
refactor: added keeper methods for new map storage of UV
0xNilesh Nov 7, 2025
43fb157
refactor: modified the msg_add_universal_validator as per uv structur…
0xNilesh Nov 7, 2025
2443682
refactor: modified the msg_remove_universal_validator as per uv struc…
0xNilesh Nov 7, 2025
3e3ff94
refactor: modified the voting ballot inbound to only allow active, pe…
0xNilesh Nov 7, 2025
a568bd7
refactor: added a new query for single universal validator
0xNilesh Nov 7, 2025
b6230a2
refactor: added generated protobuf
0xNilesh Nov 7, 2025
7a3a5fa
refactor: added query server impl for single universal validator
0xNilesh Nov 7, 2025
dd8b7ad
refactor: added generated protobuf
0xNilesh Nov 7, 2025
9cbdebc
refactor: fixed uexecutor integration tests as per new uv structure
0xNilesh Nov 7, 2025
80078a2
refactor: modified add uv endpoint to activate an inactive validator …
0xNilesh Nov 10, 2025
5b6226f
refactor: added hooks in the uvalidator module
0xNilesh Nov 10, 2025
81ca217
refactor: invoke hooks in add_uv msg endpoint
0xNilesh Nov 10, 2025
e1e074a
refactor: invoke hooks in remove_uv msg endpoint
0xNilesh Nov 10, 2025
44e8b34
refactor: merge main branch
0xNilesh Nov 10, 2025
c730565
feat: added a new msg for updating a validator's metadata
0xNilesh Nov 10, 2025
fd4d36e
refactor: added generated protobuf
0xNilesh Nov 10, 2025
cf426d0
add: keyShare Manager ut
Aman035 Nov 10, 2025
d78b8c8
rm: list
Aman035 Nov 10, 2025
2d5ef92
refactor: added types for msg_update_universal_validator
0xNilesh Nov 10, 2025
e535c9e
refactor: added tests for msg_update_universal_validator validateBasic
0xNilesh Nov 10, 2025
60e3f68
feat: added msg server impl for msg_update_universal_validator
0xNilesh Nov 10, 2025
691b5ed
refactor: added generated protobuf
0xNilesh Nov 10, 2025
96bf365
minor uv package changes
Aman035 Nov 10, 2025
46cbf78
feat: added utss module
0xNilesh Nov 11, 2025
93c61bf
refactor: added uvalidator hook impl in utss
0xNilesh Nov 11, 2025
388fcbe
feat: added tssKey messages in proto
0xNilesh Nov 11, 2025
602bcaf
refactor: added msg for tss process initiation and voting
0xNilesh Nov 11, 2025
a355c18
refactor: imported uvalidator module in utss module
0xNilesh Nov 11, 2025
509f10c
refactor: added types of msg_update_params
0xNilesh Nov 11, 2025
e14978e
refactor: added msg_update_params types tests
0xNilesh Nov 11, 2025
03e9c9a
refactor: added types of tss_process
0xNilesh Nov 11, 2025
a541875
refactor: added types of tss_key
0xNilesh Nov 11, 2025
19ae4f2
refactor: added keys of keeper storage
0xNilesh Nov 11, 2025
1e96664
refactor: added params msg impl
0xNilesh Nov 11, 2025
bf2d7c0
refactor: added types of tss_key
0xNilesh Nov 11, 2025
a9ecd1f
refactor: added generated protobuf
0xNilesh Nov 11, 2025
2c2381f
fix: revert admin of uregistry module
0xNilesh Nov 11, 2025
07744c8
feat: added messages for initiating tss process and voting in proto
0xNilesh Nov 11, 2025
19ad203
refactor: added generated protobuf
0xNilesh Nov 11, 2025
95265e4
refactor: updated proto for tss_key_process
0xNilesh Nov 11, 2025
457200a
refactor: added generated protobuf
0xNilesh Nov 11, 2025
dcf6f2c
refactor: added initiate key tss msg impl
0xNilesh Nov 11, 2025
d1c0d80
refactor: added event for tss key process initiation
0xNilesh Nov 11, 2025
dfe9f59
add: transport
Aman035 Nov 11, 2025
821de72
refactor: modified ballot proto to support tss
0xNilesh Nov 11, 2025
b096a58
refactor: added generated protobuf
0xNilesh Nov 11, 2025
2ae0a9d
refactor: added msg_vote_key_process impl
0xNilesh Nov 11, 2025
9bb8eb8
refactor: added msg_vote_key_process impl
0xNilesh Nov 11, 2025
5d3ec79
refactor: added hooks implementation for initiating tss process
0xNilesh Nov 11, 2025
fdf7537
initial demo
Aman035 Nov 11, 2025
1949c31
feat: modified the integration-test directory
0xNilesh Nov 12, 2025
cc33ff8
tests: added integration tests for msg_add_universal_validator
0xNilesh Nov 12, 2025
dd517d6
tests: added integration tests for msg_update_universal_validator
0xNilesh Nov 12, 2025
2616b2e
minor changes
Aman035 Nov 12, 2025
f2c100c
feat: update UVs status when tss vote finalises
0xNilesh Nov 13, 2025
a907fd1
feat: imported utssKeeper in uvalidatorKeeper
0xNilesh Nov 13, 2025
bb54e18
refactor: added a helper fn for getParticipants in utss module
0xNilesh Nov 13, 2025
b66b32e
refactor: updated remove universal validator endpoint to reject remov…
0xNilesh Nov 13, 2025
515394b
test: added integration tests of remove_universal_validator msg
0xNilesh Nov 13, 2025
3c24607
fix: fixed the removal of UV endpoint
0xNilesh Nov 13, 2025
e3513b7
refactor: modified tss key process type from reshare to refresh
0xNilesh Nov 13, 2025
e377fa2
refactor: added generated protobuf
0xNilesh Nov 13, 2025
2be1e23
refactor: added tss_process_type rename in module
0xNilesh Nov 13, 2025
fa9493f
feat: mitigated ballot unique key by hashing whole inbound
0xNilesh Nov 17, 2025
7629624
feat: mitigated tss ballot unique key
0xNilesh Nov 17, 2025
825ca41
feat: added integration test for initiate tss key and removed process…
0xNilesh Nov 17, 2025
8432152
feat: added integration test for vote tss key process
0xNilesh Nov 17, 2025
c1f48c4
feat: added queries in proto for utss module
0xNilesh Nov 17, 2025
3aebd30
refactor: added generated protobuf
0xNilesh Nov 17, 2025
d3d8a75
feat: added query server implementation
0xNilesh Nov 17, 2025
65630ab
refactor: added generated protobuf
0xNilesh Nov 17, 2025
49e4770
refactor: updated admin address of utss to actual prod admin
0xNilesh Nov 17, 2025
308c72e
refactor: reduced the default tss process expiry block to 500
0xNilesh Nov 17, 2025
5a8a172
refactor: updated the tss process initiation event to emit participan…
0xNilesh Nov 17, 2025
1019a2a
refactor: modified the tss voting ballot to use tss process participa…
0xNilesh Nov 17, 2025
ed33bcd
fix: fixed the expiryAfterBlocks in tss voting
0xNilesh Nov 17, 2025
e738fd9
fix: replace participant with UV struct
Aman035 Nov 17, 2025
2dc54d0
fix: demo
Aman035 Nov 17, 2025
d723f98
remove: hardcoded config
Aman035 Nov 17, 2025
3829ada
Merge branch 'main' into feat/tss-core
0xNilesh Nov 18, 2025
59c9d2c
refactor: added schemaBuilder in uvalidator module
0xNilesh Nov 18, 2025
624eed8
feat: created migration script for migrating universal validator set
0xNilesh Nov 18, 2025
60079c0
refactor: registered migrations for uvalidator module
0xNilesh Nov 18, 2025
2aa72d0
feat: created the upgrade handler for new tss-core upgrade
0xNilesh Nov 18, 2025
0ad380a
fix: minor bugs
Aman035 Nov 18, 2025
b5ce83b
add: node service
Aman035 Nov 18, 2025
cbb1270
add: print log
Aman035 Nov 18, 2025
894fd4d
removed unnecessary fns
Aman035 Nov 20, 2025
7166b64
remove: unnecessary logging
Aman035 Nov 20, 2025
3ef5f56
add: eventStore
Aman035 Nov 20, 2025
7a9c013
change: package structure
Aman035 Nov 20, 2025
5febac5
add: dkls package
Aman035 Nov 20, 2025
fc1f1ed
remove transport
Aman035 Nov 20, 2025
d4c7136
add: networking layer
Aman035 Nov 20, 2025
ef0aab1
change node logic
Aman035 Nov 20, 2025
486657e
store changes
Aman035 Nov 22, 2025
cdd4203
update dkls: must require setup
Aman035 Nov 22, 2025
0382b58
remove: core
Aman035 Nov 22, 2025
68e709f
remove: node package
Aman035 Nov 22, 2025
3394e23
add: coordinator, tss and inital sessionManager
Aman035 Nov 22, 2025
21aa17f
add: coordinator package
Aman035 Nov 24, 2025
bbe2648
change: message structure
Aman035 Nov 24, 2025
979af2f
add: GetParticipants fn in dkls
Aman035 Nov 24, 2025
5c9f113
add: get SessionType in dkls
Aman035 Nov 24, 2025
7dfcdce
add: fns to get Pary and PeerIds
Aman035 Nov 24, 2025
74304e8
add: dkls changes
Aman035 Nov 24, 2025
f3adf12
add: tc and sessionManager
Aman035 Nov 24, 2025
52d1a60
add: peer reg changes, temp demo changes
Aman035 Nov 24, 2025
19ef2e3
add: session expiry
Aman035 Nov 24, 2025
620c153
remove: unnecessary fns from dkls, add new msg types
Aman035 Nov 24, 2025
1f9eaf6
remove: unnecessary types from dkls
Aman035 Nov 24, 2025
d4f6394
add: approach for ack and begin messages
Aman035 Nov 25, 2025
8eb65d5
fix: logs
Aman035 Nov 25, 2025
f239e68
fix: signature verification
Aman035 Nov 25, 2025
32419a9
Merge pull request #95 from pushchain/feat/tss-v2
Aman035 Nov 25, 2025
1e1d593
refactor: updated validator proto files for new NetworkInfo changes
0xNilesh Nov 28, 2025
ab6c093
refactor: added generated protobuf
0xNilesh Nov 28, 2025
e3c6072
refactor: added validation in networkInfo validateBasic
0xNilesh Nov 28, 2025
80ed5b3
refactor: updated identityInfo to remove pubkey
0xNilesh Nov 28, 2025
d9ed98f
refactor: removed pubKey from add and update validator endpoints
0xNilesh Nov 28, 2025
0267812
tests: updated test cases
0xNilesh Nov 28, 2025
c390d29
refactor: modified add, update uv messages to remove pubkey
0xNilesh Nov 28, 2025
20b8347
tests: updated integration tests
0xNilesh Nov 28, 2025
e80cb1b
refactor: updated migration of UVs to add new changes
0xNilesh Nov 28, 2025
bee1936
refactor: added generated protobuf
0xNilesh Nov 28, 2025
8a01dc3
feat: updated proto file to remove core_val address from update uv msg
0xNilesh Nov 28, 2025
79c180d
refactor: added generated protobuf
0xNilesh Nov 28, 2025
2c69764
feat: updated uv update msg implementation
0xNilesh Nov 28, 2025
fb6f260
tests: updated the update uv msg tests
0xNilesh Nov 28, 2025
289907d
Merge pull request #97 from pushchain/feat/tss-core
Aman035 Nov 28, 2025
6d47013
Merge pull request #98 from pushchain/feat/tss
Aman035 Nov 28, 2025
b8ed44b
fix: dep path
Aman035 Nov 28, 2025
bb3f8dc
dep changes
Aman035 Nov 28, 2025
552c7fd
fix: workdlow
Aman035 Nov 28, 2025
9322569
fix: gh-action
Aman035 Nov 28, 2025
06d6db0
fix: gh
Aman035 Nov 28, 2025
08e0b05
fix: gh
Aman035 Nov 28, 2025
b271b42
fix: gh
Aman035 Nov 28, 2025
5869f07
fix: reset events on crash
Aman035 Dec 1, 2025
d2af0fd
fix: architecture doc
Aman035 Dec 1, 2025
5079ff5
add: qc in coordinator
Aman035 Dec 2, 2025
42f2fb9
remove: unnecessary fn from dkls
Aman035 Dec 3, 2025
f13d684
add: sessionManager Changes
Aman035 Dec 3, 2025
5c82664
fix: make file
Aman035 Dec 3, 2025
114203f
modular tests
Aman035 Dec 3, 2025
51a378c
add: tss qc
Aman035 Dec 3, 2025
647fd47
disable keyrefresh
Aman035 Dec 3, 2025
3c1b733
fix: sign participants selection
Aman035 Dec 3, 2025
6666f12
fix: temp demo
Aman035 Dec 3, 2025
173f377
change: keyId to id
Aman035 Dec 3, 2025
437e981
remove: keyId usage from dkls
Aman035 Dec 3, 2025
ca22ceb
fix: use eventId as unique identifier
Aman035 Dec 3, 2025
bf38004
feat: added the tss process quorum_change in the proto
0xNilesh Dec 3, 2025
fb97297
refactor: added generated protobuf
0xNilesh Dec 3, 2025
06661c6
refactor: modified the tss process validateBasic fn
0xNilesh Dec 3, 2025
da08ddd
refactor: updated the tss hooks to emit quorum_change tss process in …
0xNilesh Dec 3, 2025
fbef6a8
fix: use uv type from core
Aman035 Dec 4, 2025
825d502
Merge branch 'feat/tss-keygen-keyrefresh' of https://github.com/push-…
Aman035 Dec 4, 2025
40f1c98
Merge branch 'main' into feat/tss-keygen-keyrefresh
0xNilesh Dec 4, 2025
448fc34
fix: unit tests - skip dkls lib tc
Aman035 Dec 4, 2025
feaccaa
Merge branch 'feat/tss-keygen-keyrefresh' of https://github.com/push-…
Aman035 Dec 4, 2025
cfe1d0d
fix: make test
Aman035 Dec 4, 2025
7fcd35d
test: pv repo clone
Aman035 Dec 4, 2025
61f4140
test: pv repo clone
Aman035 Dec 4, 2025
b310d99
fix: event listening changes
mohammeds1992 Dec 4, 2025
7549bec
fix: review comments
mohammeds1992 Dec 4, 2025
f668211
Merge pull request #111 from pushchain/tss-event-listening
Aman035 Dec 4, 2025
f201cbf
fix: verification issues
Aman035 Dec 4, 2025
5afe386
remove: dataProvider
Aman035 Dec 4, 2025
7d8bcb9
test: gh action
Aman035 Dec 4, 2025
8b92ba7
fix: not skipping tss tests
Aman035 Dec 4, 2025
68689ab
add: access action
Aman035 Dec 4, 2025
2fce38d
fix: makefile
Aman035 Dec 4, 2025
dd9be0c
fix: action uses ci token for fetching dep
Aman035 Dec 4, 2025
6d41011
fix: cargo using ci pat
Aman035 Dec 4, 2025
c698ef5
add: cred manager
Aman035 Dec 4, 2025
e95312b
fix: docker relase
Aman035 Dec 4, 2025
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
32 changes: 32 additions & 0 deletions .github/actions/setup-dkls23/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: 'Setup dkls23-rs'
description: 'Configure Git/Cargo and clone dkls23-rs repository for building'

inputs:
ci_token:
description: 'CI token with access to dkls23-rs and garbling repositories'
required: true

runs:
using: 'composite'
steps:
- name: Setup Git and Cargo for private repos
shell: bash
env:
CI_DKLS_GARBLING: ${{ inputs.ci_token }}
run: |
# Configure Git URL rewrite to include token for pushchain repos
git config --global url."https://${CI_DKLS_GARBLING}@github.com/pushchain/".insteadOf "https://github.com/pushchain/"
git config --global url."https://github.com/".insteadOf "[email protected]:"

# Also set up credential helper as fallback (for Cargo's git operations)
git config --global credential.helper store
echo "https://${CI_DKLS_GARBLING}@github.com" > ~/.git-credentials
chmod 600 ~/.git-credentials

# Configure Cargo to use Git CLI for fetching dependencies
mkdir -p ~/.cargo
echo '[net]' >> ~/.cargo/config.toml
echo 'git-fetch-with-cli = true' >> ~/.cargo/config.toml

# Clone dkls23-rs repository
git clone --depth 1 https://${CI_DKLS_GARBLING}@github.com/pushchain/dkls23-rs.git ../dkls23-rs
20 changes: 14 additions & 6 deletions .github/workflows/docker-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ name: docker image release
on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+' # ignore rc
- 'v[0-9]+.[0-9]+.[0-9]+' # ignore rc

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand All @@ -25,16 +25,24 @@ jobs:
- name: Check out the repo
uses: actions/checkout@v4

- name: Install Rust (for dkls23-rs dependency)
uses: dtolnay/rust-toolchain@stable

- name: Setup dkls23-rs
uses: ./.github/actions/setup-dkls23
with:
ci_token: ${{ secrets.CI_DKLS_GARBLING }}

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

# all lowercase ghcr registry
- run: |
DOCKER_REGISTRY=`echo "${{ env.REGISTRY }}/${{ github.repository_owner }}" | tr '[:upper:]' '[:lower:]'`
echo "DOCKER_REGISTRY=$DOCKER_REGISTRY" >> $GITHUB_ENV
DOCKER_REGISTRY=`echo "${{ env.REGISTRY }}/${{ github.repository_owner }}" | tr '[:upper:]' '[:lower:]'`
echo "DOCKER_REGISTRY=$DOCKER_REGISTRY" >> $GITHUB_ENV

REPO_NAME=`echo "${{ github.repository }}" | awk -F'/' '{print $2}' | tr '[:upper:]' '[:lower:]'`
echo "REPO_NAME=$REPO_NAME" >> $GITHUB_ENV
REPO_NAME=`echo "${{ github.repository }}" | awk -F'/' '{print $2}' | tr '[:upper:]' '[:lower:]'`
echo "REPO_NAME=$REPO_NAME" >> $GITHUB_ENV

- name: Parse tag
id: tag
Expand Down Expand Up @@ -68,4 +76,4 @@ jobs:
binaries: |
- /go/bin/pchaind
build-env: |
- BUILD_TAGS=muslc
- BUILD_TAGS=muslc
174 changes: 174 additions & 0 deletions .github/workflows/test-dkls23-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,174 @@
name: Test dkls23-rs Build

on:
workflow_dispatch: # Manual trigger - can be run manually from any branch
push:
# Trigger on push to any branch when workflow file or related files change
paths:
- '.github/workflows/test-dkls23-build.yml'
- 'go.mod'
- 'Makefile'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

env:
GO_VERSION: 1.22.3

jobs:
test-dkls23-build:
runs-on: ubuntu-latest
permissions:
contents: read
actions: read

steps:
- name: Check out source
uses: actions/checkout@v4

- name: Configure Git for private repos
env:
CI_DKLS_GARBLING: ${{ secrets.CI_DKLS_GARBLING }}
run: |
# Configure git to use HTTPS
git config --global url."https://github.com/".insteadOf "[email protected]:"
# Configure credential helper to use PAT token with dkls/garbling access
git config --global credential.helper store
# Store credentials for git operations using PAT with dkls access
echo "https://${CI_DKLS_GARBLING}@github.com" > ~/.git-credentials
chmod 600 ~/.git-credentials
# Verify git config
git config --global --list | grep -E "(url|credential)" || true

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
check-latest: true

- name: Install Rust (for dkls23-rs dependency)
uses: dtolnay/rust-toolchain@stable

- name: Test clone dkls23-rs repository
env:
CI_DKLS_GARBLING: ${{ secrets.CI_DKLS_GARBLING }}
run: |
echo "Testing access to private dkls23-rs repository..."
# Try to clone the private repo using PAT with dkls access
if git clone --depth 1 https://${CI_DKLS_GARBLING}@github.com/pushchain/dkls23-rs.git ../dkls23-rs; then
echo "✅ Successfully cloned dkls23-rs repository"
ls -la ../dkls23-rs/ || true
else
echo "❌ Failed to clone dkls23-rs repository"
echo "Checking if directory exists..."
ls -la ../ || true
exit 1
fi

- name: Build dkls23-rs dependency
env:
CI_DKLS_GARBLING: ${{ secrets.CI_DKLS_GARBLING }}
run: |
echo "Building dkls23-rs dependency..."
if [ ! -d "../dkls23-rs" ]; then
echo "❌ dkls23-rs directory not found"
exit 1
fi

# Check if header file exists
if [ -f "../dkls23-rs/wrapper/go-wrappers/../go-dkls/include/go-dkls.h" ]; then
echo "✅ Header file already exists, skipping build"
else
echo "Building dkls23-rs..."
cd ../dkls23-rs/wrapper/go-wrappers
make build || {
echo "❌ Failed to build dkls23-rs"
echo "Checking Rust/Cargo setup..."
cargo --version || echo "Cargo not found"
rustc --version || echo "Rustc not found"
exit 1
}
fi

# Verify build artifacts
if [ -f "../dkls23-rs/target/release/libgodkls.dylib" ] || \
[ -f "../dkls23-rs/target/release/libgodkls.so" ] || \
[ -f "../dkls23-rs/target/release/libgodkls.a" ]; then
echo "✅ Build artifacts found"
ls -la ../dkls23-rs/target/release/libgodkls.* || true
else
echo "⚠️ Build artifacts not found in expected location"
echo "Searching for build artifacts..."
find ../dkls23-rs/target -name "libgodkls.*" 2>/dev/null || echo "No libgodkls files found"
fi

- name: Verify go.mod replace directive
run: |
echo "Checking go.mod replace directive..."
if grep -q "go-wrapper => \.\.\/dkls23-rs" go.mod; then
echo "✅ go.mod has correct replace directive"
grep "go-wrapper =>" go.mod
else
echo "⚠️ go.mod replace directive not found or incorrect"
grep "go-wrapper" go.mod || echo "No go-wrapper entry found"
fi

- name: Test go mod download
run: |
echo "Testing go mod download with dkls23-rs..."
if go mod download; then
echo "✅ go mod download succeeded"
else
echo "❌ go mod download failed"
exit 1
fi

- name: Test go mod verify
run: |
echo "Verifying go modules..."
if go mod verify; then
echo "✅ go mod verify succeeded"
else
echo "⚠️ go mod verify failed (may be expected with local replace)"
fi

- name: Test building a TSS package
run: |
echo "Testing if we can build a TSS package..."
# Try to build a simple TSS package to verify everything works
if go build -o /dev/null ./universalClient/tss/coordinator 2>&1; then
echo "✅ Successfully built TSS coordinator package"
else
echo "⚠️ Failed to build TSS coordinator (this may be expected if CGO is required)"
echo "Build output:"
go build -o /dev/null ./universalClient/tss/coordinator 2>&1 || true
fi

- name: Summary
if: always()
run: |
echo "## Build Test Summary" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "### Repository Access" >> $GITHUB_STEP_SUMMARY
if [ -d "../dkls23-rs" ]; then
echo "✅ dkls23-rs repository cloned successfully" >> $GITHUB_STEP_SUMMARY
else
echo "❌ dkls23-rs repository not found" >> $GITHUB_STEP_SUMMARY
fi
echo "" >> $GITHUB_STEP_SUMMARY
echo "### Build Status" >> $GITHUB_STEP_SUMMARY
if [ -f "../dkls23-rs/target/release/libgodkls.dylib" ] || \
[ -f "../dkls23-rs/target/release/libgodkls.so" ] || \
[ -f "../dkls23-rs/target/release/libgodkls.a" ]; then
echo "✅ Build artifacts found" >> $GITHUB_STEP_SUMMARY
else
echo "⚠️ Build artifacts not found" >> $GITHUB_STEP_SUMMARY
fi
echo "" >> $GITHUB_STEP_SUMMARY
echo "### Go Module Status" >> $GITHUB_STEP_SUMMARY
if go mod download 2>&1 | grep -q "go-wrapper"; then
echo "✅ go mod download works with go-wrapper" >> $GITHUB_STEP_SUMMARY
else
echo "⚠️ go mod download may have issues" >> $GITHUB_STEP_SUMMARY
fi
12 changes: 10 additions & 2 deletions .github/workflows/unit-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ concurrency:
cancel-in-progress: true

env:
GO_VERSION: 1.22.3
GO_VERSION: 1.22.3

jobs:
tests:
Expand All @@ -22,5 +22,13 @@ jobs:
go-version: ${{ env.GO_VERSION }}
check-latest: true

- name: Install Rust (for dkls23-rs dependency)
uses: dtolnay/rust-toolchain@stable

- name: Setup dkls23-rs
uses: ./.github/actions/setup-dkls23
with:
ci_token: ${{ secrets.CI_DKLS_GARBLING }}

- name: Tests
run: make test
run: make test
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,6 @@ universalClient/coverage.out
*.db
*.db-shm
*.db-wal
*.DS_Store
# TSS data directory
tss-data/
37 changes: 29 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ include contrib/devtools/Makefile

all: install lint test

build: go.sum
build: go.sum build-dkls23
ifeq ($(OS),Windows_NT)
$(error wasmd server not supported. Use "make build-windows-client" for client)
exit 1
Expand All @@ -111,20 +111,41 @@ else
go build -mod=readonly $(BUILD_FLAGS) -o build/contract_tests ./cmd/contract_tests
endif

install: go.sum
install: go.sum build-dkls23
go install -mod=readonly $(BUILD_FLAGS) ./cmd/pchaind
go install -mod=readonly $(BUILD_FLAGS) ./cmd/puniversald

########################################
### Tools & dependencies

# Build dkls23-rs dependency
# Always builds the dkls23-rs library to ensure it's up to date
# Note: The dkls23-rs repository must be cloned at ../dkls23-rs before running this target
.PHONY: build-dkls23
build-dkls23:
@echo "--> Building dkls23-rs dependency..."
@if [ ! -d "../dkls23-rs" ]; then \
echo " ⚠️ Warning: ../dkls23-rs not found."; \
echo " Please clone the dkls23-rs repository:"; \
echo " git clone https://github.com/pushchain/dkls23-rs.git ../dkls23-rs"; \
echo " Then ensure Rust/Cargo is installed and run 'make build-dkls23' again."; \
exit 1; \
fi
@echo " Building dkls23-rs library..."
@cd ../dkls23-rs/wrapper/go-wrappers && make build || { \
echo " Error: Failed to build dkls23-rs. Ensure Rust/Cargo is installed."; \
exit 1; \
}
@echo " ✓ dkls23-rs library built"

go-mod-cache: go.sum
@echo "--> Download go modules to local cache"
@go mod download

go.sum: go.mod
@echo "--> Ensure dependencies have not been modified"
@go mod verify
@go mod tidy
@go mod verify || echo "Warning: go mod verify failed (this may be expected for local replace modules like go-wrapper)"

draw-deps:
@# requires brew install graphviz or apt-get install graphviz
Expand All @@ -143,16 +164,16 @@ distclean: clean
test: test-unit
test-all: test-race test-cover test-system

test-unit:
@VERSION=$(VERSION) go test -mod=readonly -tags='ledger test_ledger_mock' ./...
test-unit: build-dkls23
@VERSION=$(VERSION) go test -mod=readonly -tags="ledger test_ledger_mock" ./...

test-race:
test-race: build-dkls23
@VERSION=$(VERSION) go test -mod=readonly -race -tags='ledger test_ledger_mock' ./...

test-cover:
test-cover: build-dkls23
@go test -mod=readonly -timeout 30m -race -coverprofile=coverage.txt -covermode=atomic -tags='ledger test_ledger_mock' ./...

benchmark:
benchmark: build-dkls23
@go test -mod=readonly -bench=. ./...

test-sim-import-export: runsim
Expand Down
Loading
Loading