forked from buildonspark/spark
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.mise.toml
More file actions
258 lines (234 loc) · 9 KB
/
Copy path.mise.toml
File metadata and controls
258 lines (234 loc) · 9 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
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
[tools]
atlas-community = "1.0.0"
github-cli = "latest"
go = "1.26.3"
golangci-lint = "2.12.2"
gotestsum = "1.13.0"
helm = "3.19.4"
jq = "latest"
kind = "0.27.0"
lefthook = "2.1.1"
node = "24.15.0"
protoc = "33.2"
protoc-gen-go = "1.36.11"
protoc-gen-go-grpc = "1.6.0"
protoc-gen-validate = "1.3.0"
rust = { version = "latest", profile = "minimal" }
tilt = "0.36.0"
[env]
MISE_NODE_COREPACK = true
[tasks]
rds = { dir = "{{config_root}}", run = 'scripts/rds.sh' }
spark-cli-local = { dir = "{{config_root}}/sdks/js", run = 'yarn install && yarn build:packages && cd apps/spark-cli && yarn build && yarn run cli:local' }
spark-cli-regtest = { dir = "{{config_root}}/sdks/js", run = 'yarn install && yarn build:packages && cd apps/spark-cli && yarn build && yarn run cli' }
spark-cli-mainnet = { dir = "{{config_root}}/sdks/js", run = 'yarn install && yarn build:packages && cd apps/spark-cli && yarn build && yarn run cli:mainnet' }
spark-cli-dev = { dir = "{{config_root}}/sdks/js", run = 'yarn install && yarn build:packages && cd apps/spark-cli && yarn build && yarn run cli:dev' }
spark-cli-dev-mainnet = { dir = "{{config_root}}/sdks/js", run = 'yarn install && yarn build:packages && cd apps/spark-cli && yarn build && yarn run cli:dev:mainnet' }
spark-cli-loadtest = { dir = "{{config_root}}/sdks/js", run = 'yarn install && yarn build:packages && cd apps/spark-cli && yarn build && yarn run cli:loadtest' }
lint = { depends = ["lint-go", "lint-js"], description = "Run all linters (Go + JS)" }
lint-go = { dir = "{{config_root}}/spark", run = 'mise lint', description = "Run Go linters (golangci-lint + entfieldlint)" }
lint-js = { dir = "{{config_root}}/sdks/js", run = 'yarn install && yarn lint', description = "Run JS/TS linters (eslint via turbo)" }
test-go = { dir = "{{config_root}}/spark", run = 'mise test-unit' }
test-grpc = { dir = "{{config_root}}/spark", run = 'mise test-grpc' }
test-grpc-k8s = { dir = "{{config_root}}/spark", run = 'mise test-grpc-k8s' }
build-js-packages = { dir = "{{config_root}}/sdks/js", run = 'yarn install && yarn build:packages' }
test-js = { dir = "{{config_root}}/sdks/js", run = 'yarn install && yarn test' }
test-js-integration = { dir = "{{config_root}}/sdks/js", run = 'yarn install && ./scripts/with-local-ingress.sh yarn test:integration' }
test-js-integration-ssp = { dir = "{{config_root}}/sdks/js", run = 'yarn install && ./scripts/with-local-ingress.sh yarn test:integration:ssp' }
fix-atlas-conflicts = { dir = "{{config_root}}", run = 'scripts/fix-atlas-conflicts.sh' }
fix-ent-conflicts = { dir = "{{config_root}}", run = 'scripts/fix-ent-conflicts.sh' }
[tasks.money-dev]
description = "Send regtest BTC on dev to <address> [amount (default=0.0001)]"
usage = '''
arg "<addr>" "the l1 address to send to"
arg "<amount>" "amount to send in btc" default="0.0001"
'''
run = """kubectl --context dev -n bitcoin exec -it regtest-miner-bitcoind-0 -- \
bitcoin-cli \
-conf=/etc/bitcoin/bitcoin.conf \
-datadir=/data \
-rpcwallet=faucet \
sendtoaddress {{arg(name="addr")}} {{arg(name="amount", default="0.0001")}}
"""
[tasks.money-dev-rbf]
description = "Send RBF-signaled regtest BTC on dev to <address> [amount (default=0.0001)]"
usage = '''
arg "<addr>" "the l1 address to send to"
arg "<amount>" "amount to send in btc" default="0.0001"
'''
run = """kubectl --context dev -n bitcoin exec -it regtest-miner-bitcoind-0 -- \
bitcoin-cli \
-conf=/etc/bitcoin/bitcoin.conf \
-datadir=/data \
-rpcwallet=faucet \
sendtoaddress {{arg(name="addr")}} {{arg(name="amount", default="0.0001")}} "" "" false true
"""
[tasks.bumpfee-dev]
description = "RBF bump fee on a transaction in dev (must have been sent with RBF signaling)"
usage = '''
arg "<txid>" "transaction id to bump"
'''
run = """kubectl --context dev -n bitcoin exec -it regtest-miner-bitcoind-0 -- \
bitcoin-cli \
-conf=/etc/bitcoin/bitcoin.conf \
-datadir=/data \
-rpcwallet=faucet \
bumpfee {{arg(name="txid")}}
"""
[tasks.bcli-mk]
description = "Run arbitrary bitcoin-cli commands against regtest in minikube"
run = """
kubectl --context minikube -n bitcoin exec -it regtest-bitcoind-0 -c bitcoind -- \
bitcoin-cli \
-conf=/etc/bitcoin/bitcoin.conf \
-datadir=/data \
"$@"
"""
[tasks.money-mk]
description = "Send regtest BTC in minikube to <address> [amount (default=0.0001)]"
usage = '''
arg "<addr>" "the l1 address to send to"
arg "<amount>" "amount to send in btc" default="0.0001"
'''
run = """kubectl --context minikube -n bitcoin exec regtest-bitcoind-0 -- \
bitcoin-cli \
-conf=/etc/bitcoin/bitcoin.conf \
-datadir=/data \
sendtoaddress {{arg(name="addr")}} {{arg(name="amount", default="0.0001")}}
"""
[tasks.mine-mk]
description = "Mine <blocks> to <address>"
usage = '''
arg "<blocks>" "amount of blocks to mine" default="5"
arg "<addr>" "the l1 address to generate to"
'''
run = """kubectl --context minikube -n bitcoin exec regtest-bitcoind-0 -- \
bitcoin-cli \
-conf=/etc/bitcoin/bitcoin.conf \
-datadir=/data \
generatetoaddress {{arg(name="blocks", default="5")}} {{arg(name="addr")}}
"""
[tasks.get-address-mk]
description = "gets a new l1 address"
run = """kubectl --context minikube -n bitcoin exec regtest-bitcoind-0 -- \
bitcoin-cli \
-conf=/etc/bitcoin/bitcoin.conf \
-datadir=/data \
getnewaddress
"""
[tasks.broadcast-tx-mk]
description = "Broadcast a <txn>"
usage = '''
arg "<hex>" "raw transaction hex"
'''
run = """kubectl --context minikube -n bitcoin exec regtest-bitcoind-0 -- \
bitcoin-cli \
-conf=/etc/bitcoin/bitcoin.conf \
-datadir=/data \
sendrawtransaction {{arg(name="hex")}}
"""
[tasks.testmempoolaccept-mk]
description = "Test if a txn would be accepted <txn>"
usage = '''
arg "<txn>" "Transaction hex"
'''
run = """kubectl --context minikube -n bitcoin exec regtest-bitcoind-0 -- \
bitcoin-cli \
-conf=/etc/bitcoin/bitcoin.conf \
-datadir=/data \
testmempoolaccept {{arg(name="txn")}}
"""
[tasks.broadcast-pkg-mk]
description = "Broadcast a package (array) of raw tx hex to regtest in minikube"
usage = '''
arg "<hexes_json>" "JSON array of raw tx hex strings, in dependency order (e.g. [\"hex1\",\"hex2\"])"
'''
run = """kubectl --context minikube -n bitcoin exec regtest-bitcoind-0 -- \
bitcoin-cli \
-conf=/etc/bitcoin/bitcoin.conf \
-datadir=/data \
submitpackage {{arg(name="hexes_json")}}
"""
[tasks.get-raw-transaction]
description = "Return the raw transaction data."
usage = '''
arg "<txid>" "transaction id (hex)"
'''
run = """kubectl --context minikube -n bitcoin exec regtest-bitcoind-0 -- \
bitcoin-cli \
-conf=/etc/bitcoin/bitcoin.conf \
-datadir=/data \
getrawtransaction {{arg(name="txid")}} 1
"""
[tasks.check-tx-mk]
description = "Check if a tx is in mempool or on-chain (regtest/minikube)"
usage = '''
arg "<txid>" "transaction id (hex)"
'''
run = """kubectl --context minikube -n bitcoin exec regtest-bitcoind-0 -- sh -lc '\
CLI="bitcoin-cli -conf=/etc/bitcoin/bitcoin.conf -datadir=/data"; \
TX="{{arg(name="txid")}}"; \
if $CLI getmempoolentry "$TX" >/dev/null 2>&1; then \
echo "status=IN_MEMPOOL"; \
$CLI getmempoolentry "$TX"; \
elif $CLI getrawtransaction "$TX" 1 >/dev/null 2>&1; then \
echo "status=SEEN_ON_CHAIN_OR_MEMPOOL"; \
$CLI getrawtransaction "$TX" 1; \
else \
echo "status=UNKNOWN (not in mempool; not found via getrawtransaction)"; \
exit 2; \
fi'"""
[tasks.mempool-mk]
description = "List all txids in mempool (pass 'true' for verbose details)"
run = """kubectl --context minikube -n bitcoin exec regtest-bitcoind-0 -- \
bitcoin-cli \
-conf=/etc/bitcoin/bitcoin.conf \
-datadir=/data \
getrawmempool "$@"
"""
[tasks.mempool-info-mk]
description = "Show mempool summary stats (count, size, fees)"
run = """kubectl --context minikube -n bitcoin exec regtest-bitcoind-0 -- \
bitcoin-cli \
-conf=/etc/bitcoin/bitcoin.conf \
-datadir=/data \
getmempoolinfo
"""
[tasks.gen-ent]
description = "Generate ent code for Spark schemas"
dir = "{{config_root}}/spark"
run = """
echo "Generating ent schemas..."
go generate ./so/ent/...
echo ""
echo "!!!!"
echo "Ents generated. Remember to add migration changes with atlas! See README.md for more info."
echo "!!!!"
"""
[tasks.gen-ssp]
description = "Generate SSP API code"
dir = "{{config_root}}/spark"
run = "go generate ./testing/wallet/ssp_api/..."
[tasks.release]
description = "Cut a prerelease (canary) from the RC branch (use flags to promote or skip canary)"
dir = "{{config_root}}"
run = "scripts/release.sh"
[tasks.gen-protos]
description = "Generate Go code from proto files (via Make)"
dir = "{{config_root}}"
run = "make all"
[tasks.clean-protos]
description = "Clean generated proto files"
dir = "{{config_root}}"
run = "make clean"
[tasks.gen-protos-with-ts]
description = "Generates Go code from protos AND the typescript client changes"
depends = ["gen-protos"]
dir = "{{config_root}}/sdks/js/packages/spark-sdk/"
run = "yarn generate:proto"
[settings]
activate_aggressive = true
disable_backends = ["asdf"]
experimental = true
idiomatic_version_file_enable_tools = ["go", "rust"]
lockfile = true