forked from pearl-research-labs/pearl
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTaskfile.yml
More file actions
221 lines (186 loc) Β· 5.44 KB
/
Copy pathTaskfile.yml
File metadata and controls
221 lines (186 loc) Β· 5.44 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
version: 3
env:
CGO_ENABLED: 1
CGO_LDFLAGS_ALLOW: ".*zk_pow_ffi.*"
tasks:
build:zk-cache:
desc: Generate verifier circuit caches (main + v1, one-time)
run: once
dir: zk-pow
status:
- test -s src/circuit/v2_cache.bin
- test -s src/v1/v1_cache.bin
cmds:
- cargo run --release --no-default-features --bin build_cache src/circuit/v2_cache.bin src/v1/v1_cache.bin
build:zk-gobind:
desc: Build the Rust ZK verification library for Go FFI
run: once
deps: [build:zk-cache]
dir: zk-pow/bindings/go
cmds:
- cargo build --release
build:libxmss:
desc: Build the XMSS static library for Go FFI
run: once
dir: xmss
status:
- test -f libxmss.a
cmds:
- make CC={{.CC | default "gcc"}} CXX={{.CXX | default "g++"}}
build:pearld:
desc: Build pearld
deps: [build:zk-gobind, build:libxmss]
cmds:
- mkdir -p bin
- go build -tags xmss,zkpow -o bin/pearld -v ./node
build:prlctl:
desc: Build prlctl
deps: [build:zk-gobind, build:libxmss]
cmds:
- mkdir -p bin
- go build -tags xmss,zkpow -o bin/prlctl -v ./node/cmd/prlctl
build:oyster:
desc: Build oyster
deps: [build:zk-gobind, build:libxmss]
cmds:
- mkdir -p bin
- go build -tags xmss,zkpow -o bin/oyster -v ./wallet
build:oystercli:
desc: Build oystercli (interactive wallet CLI)
cmds:
- mkdir -p bin
- CGO_ENABLED=0 go build -o bin/oystercli -v ./wallet/cmd/oystercli
build:pearl:
desc: Build pearld and prlctl
deps: [build:pearld, build:prlctl]
build:blockchain:
desc: Build all blockchain binaries (pearld, prlctl, oyster, oystercli)
deps: [build:pearld, build:prlctl, build:oyster, build:oystercli]
build:miner:
desc: Install miner Python packages (Linux/Windows only; the GPU miner requires CUDA)
platforms: [linux, windows]
cmds:
- uv sync --all-packages
build:
desc: Build all (blockchain + miner)
cmds:
- task: build:blockchain
- task: build:miner
clean:
desc: Remove compiled binaries and test-generated files
cmds:
- rm -rf bin
- rm -f xmss/libxmss.a
- rm -f zk-pow/src/circuit/v2_cache.bin zk-pow/src/v1/v1_cache.bin
- rm -rf pearl-blake3/target py-pearl-mining/target zk-pow/target zk-pow/bindings/go/target
- find . -name coverage.txt -type f -delete
test:
desc: Run all tests (Go + Python)
cmds:
- task: test:go
- task: test:python
test:go:
desc: Run Go tests with race detector
deps: [build:zk-gobind, build:libxmss]
env:
GORACE: "history_size=7 halt_on_errors=1"
vars:
GOTESTSUM_FORMAT: '{{.GOTESTSUM_FORMAT | default "pkgname"}}'
GOTESTSUM_JUNITFILE: '{{.GOTESTSUM_JUNITFILE | default ""}}'
cmds:
- go tool -modfile tools/go.mod gotestsum --format {{.GOTESTSUM_FORMAT}} {{if .GOTESTSUM_JUNITFILE}}--junitfile {{.GOTESTSUM_JUNITFILE}}{{end}} -- -race -tags=rpctest,xmss,zkpow -test.timeout=45m ./...
test:python:basic:
desc: Run Python tests (excludes integration, performance, and slow)
cmds:
- uv run pytest -m "not integration and not performance and not slow" miner/
test:python:
desc: Run full Python test suite
cmds:
- uv run pytest miner/
fmt:rust:
desc: Format Rust code
cmds:
- task: fmt:rust:pearl-blake3
- task: fmt:rust:zk-pow
- task: fmt:rust:zk-gobind
- task: fmt:rust:py-pearl-mining
fmt:rust:pearl-blake3:
desc: Format pearl-blake3 Rust code
dir: pearl-blake3
cmds:
- cargo fmt
fmt:rust:zk-pow:
desc: Format zk-pow Rust code
dir: zk-pow
cmds:
- cargo fmt
fmt:rust:zk-gobind:
desc: Format zk-pow-go Rust code
dir: zk-pow/bindings/go
cmds:
- cargo fmt
fmt:rust:py-pearl-mining:
desc: Format py-pearl-mining Rust code
dir: py-pearl-mining
cmds:
- cargo fmt
fmt:go:
desc: Format Go code
cmds:
- go fmt ./...
- go tool -modfile tools/go.mod goimports -w .
fmt:python:
desc: Format Python code
cmds:
- uv run ruff format .
fmt:
desc: Format all code (Go + Rust + Python)
cmds:
- task: fmt:go
- task: fmt:rust
- task: fmt:python
lint:rust:
desc: Lint Rust code with clippy
cmds:
- task: lint:rust:pearl-blake3
- task: lint:rust:zk-pow
- task: lint:rust:zk-gobind
- task: lint:rust:py-pearl-mining
lint:rust:pearl-blake3:
desc: Lint pearl-blake3 Rust code
dir: pearl-blake3
cmds:
- cargo clippy --fix --allow-dirty --allow-staged -- -D warnings
lint:rust:zk-pow:
desc: Lint zk-pow Rust code
dir: zk-pow
cmds:
- cargo clippy --fix --allow-dirty --allow-staged -- -D warnings
lint:rust:zk-gobind:
desc: Lint zk-pow-go Rust code
dir: zk-pow/bindings/go
cmds:
- cargo clippy --fix --allow-dirty --allow-staged -- -D warnings
lint:rust:py-pearl-mining:
desc: Lint py-pearl-mining Rust code
dir: py-pearl-mining
cmds:
- cargo clippy --fix --allow-dirty --allow-staged -- -D warnings
lint:go:
desc: Lint Go code
cmds:
- go tool -modfile tools/go.mod golangci-lint run -v ./...
lint:python:
desc: Lint Python code with ruff
cmds:
- uv run ruff check --fix .
lint:
desc: Lint all code (Go + Rust + Python)
cmds:
- task: lint:go
- task: lint:rust
- task: lint:python
tidy:
desc: Tidy dependencies
cmds:
- go mod tidy